Running the tests for browser it works very well.
But running with nodejs environment it breaks with assert.isUndefined is not a function
I'm not able to reproduce this issue. Do you have a public repo that I could look at that demonstrates this problem?
Hello @pragmaticivan, thanks for your issue.
Can you provide an example?
I tried to reproduce with this following code:
const chai = require('chai');
const assert = chai.assert;
assert.isUndefined(undefined);
assert.isUndefined('this is not undefined');
And I got the following, which is the expected behavior
/Users/lucas/dev/test/node_modules/chai/lib/chai/assertion.js:107
throw new AssertionError(msg, {
^
AssertionError: expected 'this is not undefined' to equal undefined
at Function.assert.isUndefined (/Users/lucas/dev/test/node_modules/chai/lib/chai/interface/assert.js:478:32)
at Object.<anonymous> (/Users/lucas/dev/test/test.js:6:8)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3)
at Module.runMain (module.js:607:10)
at run (bootstrap_node.js:382:7)
at startup (bootstrap_node.js:137:9)
I tested using chai v3.5.0 with node v7.0.0
Hi @pragmaticivan, thanks for the issue!
I just tried to run all tests on Node here, and I couldn't reproduce this problem.
We also have tests for this on L391 of test/assert.js.
Can you please provide us a runnable example in which this occurs? What version of Chai/Node are you using?
EDIT: Whoa, our support team is ultra fast...
Like ants
Hi @pragmaticivan, thanks for your issue!
Due to not being able to reproduce this and to the advice posted in this issue I'm going to close this for now, but please let us know if you are still having this problem and then we can investigate further.
Thank you very much, let us know if you need anything! 馃槃
Most helpful comment
Like ants