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

Added tests and expectations for NaN. Ex: expect(4).not.to.be.NaN; #480

Merged
merged 1 commit into from
Jul 16, 2015
Merged

Added tests and expectations for NaN. Ex: expect(4).not.to.be.NaN; #480

merged 1 commit into from
Jul 16, 2015

Conversation

bradcypert
Copy link
Contributor

Added support for NaN as per @keithamus comment on issue #477

I agree. I think the to.be.NaN; structure is what makes the most sense for this issue.

@keithamus
Copy link
Member

Great work @bradcypert! Couple of notes:

  • Please don't compile chai.js, this is done per release. Could you please rebase and exclude the chai.js changes?
  • Could you please also add assert.isNaN and assert.isNotNaN - these are also important functions to be included.
  • Documentation is missing from this. Please refer to other addProperty calls, to see how we document chai properties.
  • Please also add tests for .should.be.NaN and so on, and tests for assert.is[Not]NaN - eventually I'll be adding coverage checking back into chai, and it'd be nice to make sure things are all properly covered 😜

Fix the above issues, and I'll be overjoyed to hit the big green merge button 😄

@bradcypert
Copy link
Contributor Author

I've done everything excluding the rebase, however, my assert tests are failing against saucelabs, but running locally.

Any chance you'd be interested in taking a look?

@keithamus
Copy link
Member

Passing on travis, which is good enough for me 😉

@bradcypert
Copy link
Contributor Author

Haha, fair enough. My git-fu is weak. How do I go about rebaseing to prevent my changes to chai.js?

@keithamus
Copy link
Member

I don't have much time right now - but could help out maybe tomorrow.

In the meantime you could read a tutorial, e.g. https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase. You just need to squash both commits and checkout the old copy of chai.js and then amend the commit with the older checked out copy.

@bradcypert
Copy link
Contributor Author

Squashed everything and reverted my incidental change to Chai.js

@keithamus
Copy link
Member

Great work @bradcypert 😸

keithamus added a commit that referenced this pull request Jul 16, 2015
Added tests and expectations for NaN. Ex: `expect(4).not.to.be.NaN;`
@keithamus keithamus merged commit 5520c16 into chaijs:master Jul 16, 2015
@bradcypert bradcypert deleted the NaN-support branch July 16, 2015 23:51
@screendriver
Copy link

to.be.NaN; should be added to the docs 😉

@keithamus
Copy link
Member

@screendriver it will be soon. The docs are pretty badly out of date but we're working on them 😄

@screendriver
Copy link

👍

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

Successfully merging this pull request may close these issues.

3 participants