Automattic / Automattic/expect.js
.eql() is broken in ES6
Open
- Dominant language
- JavaScript
- Stars
- 2.1k
- Forks
- 207
- PR merge metrics
- No merged PRs in 30d
Description
Following tests should not pass, but pass in Node v4+ and [modern browsers that support ES6](https://kangax.github.io/compat-table/es6/#test-Object_static_methods_accept_primitives_Object.keys).
``` js
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](https://github.com/nodejs/node/pull/193) and [commonjs-assert](https://github.com/defunctzombie/commonjs-assert/pull/7).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.