`global.assert = require('assert')` problem
atian25 opened this issue · 5 comments
atian25 commented
global.assert = require('assert');
describe('test/showcase.test.js', () => {
const arr = [ 1, 2, 3 ];
it('power-assert', () => {
assert(arr[1] === 10);
});
});
then the unit test passed...
twada commented
@atian25 Thank you for reporting!
Ah, false positives... It's a bit hard problem but I have to wrestle with this.
If you rely on global assert
object, please use power-assert for the global.assert
for a while.
(Your temporary fix is right)
Thanks.
atian25 commented
Thanks for quick response.
btw, global.assert = require('assert');
is used at test/.setup.js
, a DOT
file.