mongoose icon indicating copy to clipboard operation
mongoose copied to clipboard

Remove jest jsdom warning

Open vkarpov15 opened this issue 9 years ago • 4 comments

https://github.com/Automattic/mongoose/commit/c1de420f34b1cbdce888d7481b412080a77070b0#commitcomment-23791131

vkarpov15 avatar Aug 29 '17 00:08 vkarpov15

Fixed in https://github.com/Automattic/mongoose/commit/9c487909a21a128dae8ed434cf3bd4630129d64e

vkarpov15 avatar Aug 29 '17 00:08 vkarpov15

It's seems still relevant.

"jest": "^22.4.4",
"mongoose": "^5.3.13",

Jest testing environment is node.

image

xilaraux avatar Nov 23 '18 14:11 xilaraux

@xilaraux Maybe you resolved it since, but for those who still have this issue, make sure you didn't declare "window" object in globals in your Jest configuration. The warning only appears when both Jest and window are defined.

gregorybellencontre avatar Apr 14 '19 18:04 gregorybellencontre

@gregorybellencontre do you know of a better way to check the jest test environment? I might be missing something - the spirit of this warning is avoiding the jsdom test environment, not the window global specifically

vkarpov15 avatar Apr 17 '19 23:04 vkarpov15