Skip to content

.eql() is broken in ES6 #158

Open
Open
@teppeis

Description

@teppeis

Following tests should not pass, but pass in Node v4+ and modern browsers that support ES6.

expect('a').to.be.eql(['a']);
expect('a').to.be.eql({0: 'a'});
expect(1).to.be.eql({});
expect(true).to.be.eql({});

Change of Object.keys in ES6 causes this issue.
I've fixed same issues in Node.js core assert.deepEqual and commonjs-assert.

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