Skip to content
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

expect(new Error).to.be.an('error') does not work #1389

Closed
egebircan opened this issue May 1, 2021 · 2 comments
Closed

expect(new Error).to.be.an('error') does not work #1389

egebircan opened this issue May 1, 2021 · 2 comments

Comments

@egebircan
Copy link

it('test case', () => { expect(new Error).to.be.an('error'); })

When the code above is executed, "AssertionError: expected [Error] to be an error" is thrown.

According to the docs this behavior is not natural.

@martineizayaga
Copy link

The code you wrote @egebircan works for me.

@egebircan
Copy link
Author

You are right @martineizayaga. I tested it again and it works. I guess there was some kind of an environment issue on my local machine at that moment. Thanks for pointing out.

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