4

Here is the Codesandbox

I want to run a rest, but the Tests tab shows this error.

Could not find module in path: 'react-dom/client' relative to
'/node_modules/@testing-library/react/dist/@testing-library/react.esm.js'

I referred to these but they did NOT solve my problem.

  1. Reinstalling it in the devDependencies https://github.com/codesandbox/codesandbox-client/issues/2276
  2. Turning off my UBlock origin. https://github.com/enzymejs/enzyme/issues/529
  3. Trying different browsers

What should I do to successfully run this test?

enter image description here

4
  • Please show some code. This should have nothing to do with how you're interacting with CSB (browser, adblocker, etc). Commented Apr 5, 2022 at 5:20
  • @code I provided the Codesandbox link at the top. Is it accessible? Commented Apr 5, 2022 at 5:27
  • Did you solve this? Hard to tell from the current status of the sandbox. I've got a similar problem, and the only suggestion I've found so far is to roll back @testing-library/react to v12. Commented Apr 24, 2022 at 1:29
  • 1
    @tim.rohrer Apparently it is a known issue. You will need to use Terminal. I asked the further question for the clarification github.com/codesandbox/codesandbox-client/issues/6599 Commented Apr 24, 2022 at 13:01

1 Answer 1

2

This is a known issue. The answer says you need to use a Terminal to run this. Terminal is just below the preview window.

https://github.com/codesandbox/codesandbox-client/issues/6599

Hey @eps1lon - Thank you for flagging this, the tests unfortunately don't work within Server sandboxes and we'll be removing them soon. To run the tests you'll need to use the terminal. Sorry for the trouble!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.