dom-testing-library-template
dom-testing-library-template copied to clipboard
Fails with `Identifier 'test' has already been declared`
(Without any changes)
Identifier 'test' has already been declared
SyntaxError: Identifier 'test' has already been declared
at eval (<anonymous>)
at Eo (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:201748)
at e.value (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:218712)
at e.value (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:245871)
at t (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:218427)
at evaluate (https://51uok.csb.app/node_modules/pretty-format/build/index.js:8:3)
at Eo (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:201752)
at e.value (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:218712)
at e.value (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:245871)
at t (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:218427)
at evaluate (https://51uok.csb.app/node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js:567:26)
at Eo (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:201752)
at e.value (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:218712)
at e.value (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:245871)
at t (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:218427)
at evaluate (https://51uok.csb.app/node_modules/@testing-library/react/dist/@testing-library/react.esm.js:44:17)
at Eo (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:201752)
at e.value (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:218712)
at e.value (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:245871)
at t (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:218427)
at evaluate (https://51uok.csb.app/src/__tests__/index.test.js:7:15)
at Eo (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:201752)
at e.value (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:218712)
at e.value (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:245871)
at e.value (https://codesandbox.io/static/js/sandbox.55f5df20e.js:1:245491)
at https://codesandbox.io/static/js/jest-lite.fe1609ac0.chunk.js:1:15520
at l (https://codesandbox.io/static/js/common-sandbox.26857ffcc.chunk.js:1:255733)
at Generator._invoke (https://codesandbox.io/static/js/common-sandbox.26857ffcc.chunk.js:1:255486)
at Generator.forEach.e.<computed> [as next] (https://codesandbox.io/static/js/common-sandbox.26857ffcc.chunk.js:1:256090)
at t (https://codesandbox.io/static/js/common-sandbox.26857ffcc.chunk.js:1:2405)
at i (https://codesandbox.io/static/js/common-sandbox.26857ffcc.chunk.js:1:2616)
at https://codesandbox.io/static/js/common-sandbox.26857ffcc.chunk.js:1:2675
at new Promise (<anonymous>)
at https://codesandbox.io/static/js/common-sandbox.26857ffcc.chunk.js:1:2556
at https://codesandbox.io/static/js/jest-lite.fe1609ac0.chunk.js:1:15876
at Array.map (<anonymous>)
at e.<anonymous> (https://codesandbox.io/static/js/jest-lite.fe1609ac0.chunk.js:1:15224)
at l (https://codesandbox.io/static/js/common-sandbox.26857ffcc.chunk.js:1:255733)
at Generator._invoke (https://codesandbox.io/static/js/common-sandbox.26857ffcc.chunk.js:1:255486)
at Generator.forEach.e.<computed> [as next] (https://codesandbox.io/static/js/common-sandbox.26857ffcc.chunk.js:1:256090)
at t (https://codesandbox.io/static/js/common-sandbox.26857ffcc.chunk.js:1:2405)
at i (https://codesandbox.io/static/js/common-sandbox.26857ffcc.chunk.js:1:2616)
Thanks for the report. I've noticed this a couple of times but couldn't determine why. I reported it to codesandbox as well (https://github.com/codesandbox/codesandbox-client/issues/4887) since it's the only environment where I could reproduce the issue.
https://codesandbox.io/s/constate-test-bb0gk Same error