tj / should.js

BDD style assertions for node.js -- test framework agnostic
MIT License
2.75k stars 195 forks source link

changes in 1.3.0 cause failing tests to pass when not using .exists #137

Closed wshaver closed 11 years ago

wshaver commented 11 years ago

Version 1.2.2 this would throw:

should(false, 'this throws an error in version 1.2.2 but not 1.3.0!');

Similarly using assert as such:

assert(false, 'this throws an error');

The docs say it has all the same ui as assert. We build a large number of tests on this assumption and a few of them have been "passing" without actually passing since we updated the should version. :(

btd commented 11 years ago

Yes, it looks like after 1.2.2 appeared this incompatibility. At 1.2.2 exported object was the same as exported in assert, but i changed this to should testing function and merge assert functions. I do not think i will return this behavior, sorry. As workaround i can suggest: should.ok(...) or should(...).ok, but without custom message.