Skip to content

assert.deepEqual / expect().to.deep.equal incorrect with Symbols as keys #1358

@derMart

Description

@derMart

consider this:

var sym = Symbol('foo');
expect({[sym] : 1}).to.deep.equal({[sym] : 0});
assert.deepEqual({[sym] : 1}, {[sym] : 0});

I would expect both variants to fail, but they pass and do not throw an Error.
Using chai 4.2.0

The documentation does not state anything about this behaviour.
Is this working as intended or a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions