codesandbox / codesandbox/codesandbox-client

Test fails in sandbox but passes locally

Open
#5,887 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
13.6k
Forks
2.4k
Avg merge
6d 19h
Merged PRs (30d)
2

Description

🐛 bug report

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project
    adheres to.
  • I have searched the issue tracker for an issue that matches the one I want
    to file, without success. Searched terms: "testing-library", "getByRole", "jest"

Description of the problem

A test in my sandbox fails, but if I download the sandbox and run the tests it passes.

How has this issue affected you? What are you trying to accomplish?

It affects me because I cannot properly showcase a working test.

To Reproduce

See my sandbox

Your Environment
Software Name/Version
Сodesandbox Not sure how to find the version, see sandbox link
Browser Chrome Version 91.0.4472.77
Operating System macOS 11.3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodeSandbox and src/tests/hello.js, then compare its test behavior with the downloaded sandbox where the test passes. Reproduce the failure in the sandbox environment and identify the environment difference; done means the showcased test runs successfully there.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.