I'm trying to do a very simple test using mocha (no config files, no additional flags, just mocha
, yarn2
, and testee.js
file), but it always give me 0 passing
. Hell, it won't even run any file!
// testee.js
console.log('test') // No output
describe('something', () => {
it('Should run', () => {
console.log('test 2') // No output either
})
})
$ yarn mocha testee.js
0 passing (1ms)
Tools I'm using:
- Mocha 9.0.2
- Yarn Berry 2.4.2
Is mocha unsupported by Yarn 2? Should I use something else? I always use mocha for all of my test files, maybe it's time to migrate if that really is the case.
Note: I tried using yarn 1 and it worked flawlessly. Also, Mocha found the testee.js
file, otherwise it would give me not found
error instead of 0 passing