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

not in assertions is ignored #57

Closed
iensu opened this issue Apr 29, 2016 · 4 comments
Closed

not in assertions is ignored #57

iensu opened this issue Apr 29, 2016 · 4 comments
Labels

Comments

@iensu
Copy link

iensu commented Apr 29, 2016

Given the following assertion:

expect(fromJS({ x: 1})).to.not.have.key('y');

I get the following result:

AssertionError: expected 'Map { "x": 1 }' to have key 'y'

So it seems that the not statement in the assertion is ignored.

I am using:

mocha 2.4.5
chai 3.5.0
chai-immutable: 1.5.4

@astorije
Copy link
Owner

astorije commented May 2, 2016

Well that's interesting. Have you noticed this behavior with other assertions of the plugin?

I need to investigate, but if confirmed, I'm surprised the test suite didn't catch this, really.

@iensu
Copy link
Author

iensu commented May 2, 2016

Hi again!

Yes, I had a look at the test suite and it seems it should be covered, so I did some further investigation and it seems that it is https://github.com/prodatakey/dirty-chai that's the culprit here. Turning it off resolves the issue.

Thanks a lot for your time, I'm going to close this issue.

@iensu iensu closed this as completed May 2, 2016
@iensu
Copy link
Author

iensu commented May 2, 2016

As a side note, I managed to get chai-immutable and dirty-chai working together by loading immutable-chai before loading dirty-chai

@astorije
Copy link
Owner

astorije commented May 3, 2016

Hey @iensu, thanks for closing the loop!
That makes sense, there is similar requirement when using chai-immutable along with chai-as-promised.

I'm going to update the documentation to reflect that and will ping you so that you can proof-read.

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

No branches or pull requests

2 participants