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
evalmachine.<anonymous>:36
cov_29pxonmpdk().f[2]++;
^
ReferenceError: cov_29pxonmpdk is not defined
at evalmachine.<anonymous>:36:11
at evalmachine.<anonymous>:39:11
at evalmachine.<anonymous>:39:156
at Script.runInContext (vm.js:131:20)
at Script.runInNewContext (vm.js:137:17)
at Object.runInNewContext (vm.js:304:38)
at C:\Users\Tom\code\jest-pouch-coverage-bug\node_modules\pouchdb\lib\index.js:7769:21
at tryMap (C:\Users\Tom\code\jest-pouch-coverage-bug\node_modules\pouchdb\lib\index.js:7973:7)
at createDocIdsToChangesAndEmits (C:\Users\Tom\code\jest-pouch-coverage-bug\node_modules\pouchdb\lib\index.js:8427:13)
at processBatch (C:\Users\Tom\code\jest-pouch-coverage-bug\node_modules\pouchdb\lib\index.js:8410:37)
I believe this is the same issue as described in the Jest repo here: jestjs/jest#7962
I don't think there is anything that can be done on the pouchdb side, it's a side effect of evaling the code in a scope that doesn't include the jest coverage collectors.
Maybe a section in the docs could help to prevent others being tripped up by this in the future?
The text was updated successfully, but these errors were encountered:
One thing I've thought about is having the views seperated out into their own files, we can then ignore the whole directory from coverage collection with Jest's config without ignoring excess code that doesn't need to be ignored.
Reproduction repo here: https://github.com/tom-sherman/jest-pouch-coverage-bug
I believe this is the same issue as described in the Jest repo here: jestjs/jest#7962
I don't think there is anything that can be done on the pouchdb side, it's a side effect of
eval
ing the code in a scope that doesn't include the jest coverage collectors.Maybe a section in the docs could help to prevent others being tripped up by this in the future?
The text was updated successfully, but these errors were encountered: