jest-mongodb
jest-mongodb copied to clipboard
Conflict with tests that require window/document
trafficstars
Thanks a lot for creating this package. I have installed it and it works perfectly for interracting with mongo in my tests.
However it comes with a regression which is tests that require the window/dom (e.g. from react testing library document.createElement) require the default testEnvironment: jsdom which this overwrites.
Is there a way to prevent this overwriting such functionality?
You should be able to solve this by adding this to the top of any test files that require window/document:
/**
* @jest-environment jsdom
*/
Can anyone help here https://github.com/kulshekhar/ts-jest/issues/3913