Skip to content

Commit

Permalink
Resolve test errors after dependency updates
Browse files Browse the repository at this point in the history
Jest updated the JSDOM dependency to 11.12+ in a recent update. This
update causes Jest to throw a security error about localStorage when the
tests are assumed to run in the browser and no `testURL` is defined.

Since our tests are not run in the browser, a workaround for this issue
is to explicitly define the environment as `node`. Hopefully this
protects us from weird edge cases in the future.

Refs: jestjs/jest#6766, jsdom/jsdom#2304
  • Loading branch information
tollmanz committed Mar 24, 2019
1 parent aaffd56 commit fd98d35
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
"jest": "^24.5.0",
"sinon": "^4.4.8"
},
"jest": {
"testEnvironment": "node"
},
"keywords": [
"chrome devtools",
"cli",
Expand Down

0 comments on commit fd98d35

Please sign in to comment.