Closed favna closed 4 years ago
Looks like the test fails in mocha@6
@1999 I completely forgot about this pr in between all the other things. I just tried running the mocha 6 based tests locally (MacOS Catalina with Node v12) and they seem to run just fine (log here: https://hasteb.in/urumavot.yaml).
Gave Travis a bump in 554f5c9 with an empty commit to check it wasn't just flakyness
There is indeed some kind of flakyness. Now it broke on Mocha v4.
@1999 @Favna I could use this feature as well to execute root level hooks for each test case (i.e., defining beforeEach and afterEach at the root level). Is there any workaround available in the meantime?
BTW, I tried downloading the fork as a github dependency on my project (using npm install --save-dev Favna/mocha-parallel-tests#feat/file_option
) but it fails to build with errors:
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /home/src/my_project/node_modules/mocha-parallel-tests/dist/bin/cli.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/src/my_project/node_modules/mocha-parallel-tests/dist/bin/cli.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
Am I doing something wrong? The same happens if I try to run: npm install --save-dev mocha-parallel/mocha-parallel-tests
@FlyingPumba TypeScript written packages cannot really be installed from GitHub unless you manually go into node_modules/mocha-parallel-test
and run npm run build
. Since the main field in package.json will reference the compiled JS, but the source code (from GitHub) only has the source TypeScript files.
@Favna That makes sense, thanks. I will try to set it up locally.
@Favna I wouldn't say it's flaky - the tests always fail on the newly added "file" test case. Sorry, I don't have enough time to look into this project now.
I will fix it on my own.
@1999 tyvm
This will resolve #222
Merging this PR adds the Mocha option for
--file
to have a single global setup file - with the caveats that @1999 shared in the issue discussion.