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
FAIL src\actions\AllActions.test.js
● Player cancels game
TypeError: localStorage.removeItem is not a function
at Object.<anonymous>.exports.cancelGame (src/actions/AllActions.js:35:16)
at Object.<anonymous>.test (src/actions/AllActions.test.js:52:26)
at new Promise (<anonymous>)
at Promise.resolve.then.el (node_modules/p-map/index.js:46:16)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
also, I have not touched the package.json and the test script is "test": "react-scripts test --env=jsdom",
The text was updated successfully, but these errors were encountered:
I have used CRA to create my app.
followed the setup for testing and created
src/setupTests.js
in the
src/actions/AllActions.js
I have a function likeand in
src/actions/AllActions.test.js
I want to test the function. (either I want to test the localStroage or not I get the same error).after running test I get
also, I have not touched the
package.json
and the test script is"test": "react-scripts test --env=jsdom",
The text was updated successfully, but these errors were encountered: