How to run jest with 0x?
cmdcolin opened this issue Β· comments
Colin Diesh commented
Hi there,
I tried using just 0x node_modules/.bin/jest
but it gives
% 0x node_modules/.bin/jest
π₯ ProfilingError: write EPIPE
at ChildProcess.target._send (internal/child_process.js:806:20)
at ChildProcess.target.send (internal/child_process.js:676:19)
at ChildProcessWorker.send (/home/cdiesh/src/jbrowse-components/node_modules/jest-worker/build/workers/ChildProcessWorker.js:286:17)
at WorkerPool.send (/home/cdiesh/src/jbrowse-components/node_modules/jest-worker/build/WorkerPool.js:32:34)
at Farm._process (/home/cdiesh/src/jbrowse-components/node_modules/jest-worker/build/Farm.js:129:10)
at Farm._enqueue (/home/cdiesh/src/jbrowse-components/node_modules/jest-worker/build/Farm.js:152:10)
at Farm._push (/home/cdiesh/src/jbrowse-components/node_modules/jest-worker/build/Farm.js:159:12)
at /home/cdiesh/src/jbrowse-components/node_modules/jest-worker/build/Farm.js:90:14
at new Promise (<anonymous>)
at Farm.doWork (/home/cdiesh/src/jbrowse-components/node_modules/jest-worker/build/Farm.js:56:12)
Target subprocess error, code: 1
π₯ Flamegraph generated in
file:///home/cdiesh/src/jbrowse-components/23267.0x/flamegraph.html
Colin Diesh commented
I've had luck with using 0x node_modules/.bin/jest specific_file.test.js instead of without any params
David Mark Clements commented
yeah this looks like a Jest specific thing, closing as you've found a work around
Joscha Feth commented
When I use 0x
to profile jest tests it seems like I only get the graph for the jest execution itself, not for the tests running in it. I am using --runInBand
, a testEnvironment: "node"
and a single test file that is executed, so theoretically 0x should be able to pick up the executed test case.