Skip to content

Two different Errors are considered equal #15

New issue

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

Closed
MiniGod opened this issue Dec 7, 2016 · 1 comment
Closed

Two different Errors are considered equal #15

MiniGod opened this issue Dec 7, 2016 · 1 comment

Comments

@MiniGod
Copy link
Contributor

MiniGod commented Dec 7, 2016

const a = new Error('a');
const b = new Error('b');

expect(Promise.reject(a)).toRejectWith(b, done);

passes although a and b are different.

The issue is that deep-equal consider them equal:
https://runkit.com/57e01e376dc2ad1400d39ab3/584826c627aa8e0013a1adcd

@agirorn
Copy link
Owner

agirorn commented Apr 24, 2017

Could be fixed when inspect-js/node-deep-equal#48 gets merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants