-
Notifications
You must be signed in to change notification settings - Fork 9
Jest fails with window is not defiend in cre-bus-fra #15
Copy link
Copy link
Open
Description
Please find attached the stack traces:
Summary of all failing tests
FAIL ClientApp/components/details/PropertyListingDetails.test.tsx
● render PropertyListingDetails
ReferenceError: window is not defined
100 | componentDidMount = () => {
101 | this.unsubscribe = this.experiment.subscribe(() => this.forceUpdate());
> 102 | this.experiment.activate();
| ^
103 | };
104 | componentWillUnmount = () => {
105 | this.unsubscribe();
at Optimize.<anonymous> (node_modules/react-experimentify/dist/optimize.js:48:5)
at Optimize.addEventListener (node_modules/react-experimentify/node_modules/lodash/before.js:31:21)
at Optimize.activate (node_modules/react-experimentify/dist/optimize.js:35:11)
at PropertyListingDetails.componentDidMount (ClientApp/components/details/PropertyListingDetails.tsx:102:21)
at node_modules/enzyme/build/ShallowWrapper.js:215:22
at Object.batchedUpdates (node_modules/enzyme-adapter-react-16/build/ReactSixteenAdapter.js:474:22)
at new ShallowWrapper (node_modules/enzyme/build/ShallowWrapper.js:214:26)
at Object.shallow (node_modules/enzyme/build/shallow.js:21:10)
at Object.<anonymous>.test (ClientApp/components/details/PropertyListingDetails.test.tsx:47:24)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels