Issue
with --include-all-sources i get following error
Invariant Violation: dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make surewindowanddocumentare available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.
without iam getting no error, but also an uncompleted coverage report
Q
is there any way to initialize jsdom before isparta includes the sources?
Setup
Using enyzme's full lifecycle rendering https://github.com/airbnb/enzyme/blob/master/docs/api/mount.md and it seem that jsdom have to be initialized globally before isparta includes all sources!
CLI call
babel-node node_modules/isparta/bin/isparta cover --report html --include-all-sources --root 'src/js/' --include '**/*.js' _mocha -- --require ./test/setup.js --recursive ./test
Issue with --include-all-sources i get following error
Invariant Violation: dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure
windowand
documentare available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.
without iam getting no error, but also an uncompleted coverage report
Q is there any way to initialize jsdom before isparta includes the sources?