Reading Node.js assert's module documentation I have been failing to understand what is the meaning of the message parameter and how should I use it.
If I write an assertion like:
assert(container.search('asd') === undefined, "Can't find [asd]");
When runnning the code, if it fails, I just get an exception at the assertion line, and can't see the message:
assert.js:86
throw new assert.AssertionError({
^
AssertionError: false == true
at Object.<anonymous> (c:\tests\Container.js:70:1)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
assert.strictEqual(actual, expected[, message])instead? I'm not sure it'll make a difference but it's worth a try