When I added node-prune one of our tests started failing:
yarn run v1.13.0
$ jest --collectCoverage --ci --runInBand --reporters=default --reporters=jest-junit
PASS js/modules/objectives/dashboard/__tests__/_create-test.js
PASS js/modules/core/__tests__/react_select-test.js
FAIL js/__tests__/vendor-test.js
● rails-ujs should be defined as a browser global
ENOENT: no such file or directory, open '/home/circleci/project/ff/static/node_modules/rails-ujs/lib/assets/compiled/rails-ujs.js'
31 |
32 | function runScriptInContext(...paths) {
> 33 | const data = fs.readFileSync(path.resolve(...paths));
| ^
34 | const script = new vm.Script(data);
35 |
36 | const context = vm.createContext(sandbox);
at readFileSync (js/__tests__/vendor-test.js:33:19)
at Object.runScriptInContext (js/__tests__/vendor-test.js:258:21)
When I added node-prune one of our tests started failing:
relevant section of our circleci config: