You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 31, 2019. It is now read-only.
Issue
with --include-all-sources i get following error
Invariant Violation: dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure windowanddocument are 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 ./testIssue
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?