A library for running jest in watch-mode within a system and record the test-output.
This can be used to intergrate jest into your development tool.
yarn add jest-observer
npm install jest-observer
const observer = ;;
The observer supports these options:
Path to a jest config file same as in
jest -c <configfile>
Node Stream of jest's normal terminal output (stdout)
Node Stream of jest's err terminal output (stderr)
The callback will receive the jest test-result json identical as
The json will only contain data on the tests jest has run, which will only be what is staged. I plan to add an 'run-all-on-first-run' option.
Why make this?
I'm interested in adding real-time jest test-results to react-storybook. And I wanted to learn how to do some process management and communication in nodeJS.
If you use the jest config option:
testResultsProcessor, it will be ignored, since this is what's being used to capture the test-results.