We recently introduced mochapack --watch
into our testing process
cross-env NODE_ENV=development mochapack --watch --require tests/components/setup.ts \"tests/components/**/*.spec.ts\"
My VSCode instance has autosave turned on. After about two or three editing cycles, mochapack reliably fails with this error:
C:\Users\me\git\terraforming-mars\node_modules\mocha\lib\runner.js:962
throw err;
^
TypeError: runnable.enableTimeouts is not a function
at C:\Users\me\git\terraforming-mars\node_modules\mochapack\src\runner\TestRunner.ts:217:20
at Hook.eval [as callAsync] (eval at create (C:\Users\me\git\terraforming-mars\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:22:1)
at run (C:\Users\me\git\terraforming-mars\node_modules\webpack\lib\Watching.js:142:33)
at C:\Users\me\git\terraforming-mars\node_modules\webpack\lib\Watching.js:129:6
at C:\Users\me\git\terraforming-mars\node_modules\webpack\lib\HookWebpackError.js:68:3
...
When I turn it off, my workflow is just fine.
Obviously I can disable autosave for now, but does anyone have a good combined configuration of mochapack --watch and autosave that work well together?