We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$ node -v v20.13.1
const [a, b, c] = [Symbol("a"), Symbol("b"), Symbol("c")]; const result = defu({ [a]: "a", [c]: ["a", "b"] }, { [a]: "bbb", [b]: "c", [c]: ["c", "d"] }); expect(result).toEqual({ [a]: "a", [b]: "c", [c]: ["a", "b", "c", "d"] });
AssertionError: expected { [Symbol(a)]: 'bbb', …(2) } to deeply equal { [Symbol(a)]: 'a', …(2) } - Expected + Received Object { - Symbol(a): "a", + Symbol(a): "bbb", Symbol(b): "c", Symbol(c): Array [ - "a", - "b", "c", "d", ], }
Symbol keys are not iterated over the base object, but the other objects use Object.assign which does copy symbol keys.
Object.assign
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
$ node -v
v20.13.1
Reproduction
Describe the bug
Symbol keys are not iterated over the base object, but the other objects use
Object.assign
which does copy symbol keys.Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: