nyc's --exclude-node-modules option (which defaults to true) seems to be ignored by this plugin.
I have this puppeteer code in my test file:
page.addScriptTag({ path: 'node_modules/chai/chai.js' });
If I specifically exclude the above file with nyc, my test throws:
Error: Evaluation failed: ReferenceError: cov_64pz3sne0 is not defined
at __puppeteer_evaluation_script__:1:7
at ExecutionContext.evaluateHandle (node_modules/puppeteer/lib/ExecutionContext.js:121:13)
at process._tickCallback (internal/process/next_tick.js:68:7)
-- ASYNC --
at ExecutionContext.<anonymous> (node_modules/puppeteer/lib/helper.js:110:27)
at ExecutionContext.evaluate (node_modules/puppeteer/lib/ExecutionContext.js:48:31)
at ExecutionContext.<anonymous> (node_modules/puppeteer/lib/helper.js:111:23)
at DOMWorld.evaluate (node_modules/puppeteer/lib/DOMWorld.js:105:20)
at process._tickCallback (internal/process/next_tick.js:68:7)
-- ASYNC --
at Frame.<anonymous> (node_modules/puppeteer/lib/helper.js:110:27)
at Page.evaluate (node_modules/puppeteer/lib/Page.js:809:43)
at Page.<anonymous> (node_modules/puppeteer/lib/helper.js:111:23)
at Context.before (test.js:1:4248)
at process._tickCallback (internal/process/next_tick.js:68:7)
nyc's
--exclude-node-modulesoption (which defaults totrue) seems to be ignored by this plugin.I have this
puppeteercode in my test file:If I specifically exclude the above file with nyc, my test throws: