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

Merged
merged 1 commit into from Jul 16, 2015

Projects

None yet

3 participants

@bradcypert
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
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
Contributor

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
Member

Passing on travis, which is good enough for me 😉

@bradcypert
Contributor

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

@keithamus
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
Contributor

Squashed everything and reverted my incidental change to Chai.js

@keithamus
Member

Great work @bradcypert 😸

@keithamus keithamus merged commit 5520c16 into chaijs:master Jul 16, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@bradcypert bradcypert deleted the unknown repository branch Jul 16, 2015
@screendriver

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

@keithamus
Member

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

@screendriver

👍

@marekventur marekventur referenced this pull request in Gamevy/pixi-packer Dec 14, 2015
Merged

Update "chai" to version ^3.4.1 #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment