Issue
I'm using the expect package from npm, which uses this package under the hood to check for deep equality. In my eyes, the test below should fail (different values and different references), but it is passing:
it('should fail', () => {
const actual = new Set('a');
const expected = new Set('b');
expect(actual).toEqual(expected);
});

If I did something like this with another collection (like arrays), the test wouldn't pass until 1) the references are the same with assert.equal / , expect.toBe or 2) the values are the same with assert.deepEqual / expect.toEqual
Background
I'm using Babel 5 to use Set. I'm using Node 5, so the Set being used should be native.
Am I doing something wrong, or does this look like a bug in the expect package in the way it handles Sets? I've cross posted a Stack Overflow question as I'm not sure.
I originally posted this on the expect package issues, but they sent me here, since that package uses this package ;)
mjackson/expect#47 (comment)
cc: @mjackson, @rstacruz
Issue
I'm using the
expectpackage from npm, which uses this package under the hood to check for deep equality. In my eyes, the test below should fail (different values and different references), but it is passing:If I did something like this with another collection (like arrays), the test wouldn't pass until 1) the references are the same with assert.equal / , expect.toBe or 2) the values are the same with assert.deepEqual / expect.toEqual
Background
I'm using Babel 5 to use Set. I'm using Node 5, so the Set being used should be native.
Am I doing something wrong, or does this look like a bug in the
expectpackage in the way it handles Sets? I've cross posted a Stack Overflow question as I'm not sure.I originally posted this on the
expectpackage issues, but they sent me here, since that package uses this package ;)mjackson/expect#47 (comment)
cc: @mjackson, @rstacruz