Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static template JEST testing is broken #5726

Closed
wwwmonkey opened this issue May 1, 2021 · 2 comments
Closed

Static template JEST testing is broken #5726

wwwmonkey opened this issue May 1, 2021 · 2 comments

Comments

@wwwmonkey
Copy link

🐛 bug report

Preflight Checklist

  • [x ] I have read the
    Contributing Guidelines
    for this project.
  • [x ] I agree to follow the
    Code of Conduct
    that this project adheres to.
  • [x ] I have searched the issue tracker for an issue that matches the one I want
    to file, without success.

Description of the problem

Create a Static template and create a jest test. Click on Tests tab. View is stuck at "Running Test Suites..." indefinitely.
Tried:
Switching to other template types ie. React but then project code does not run. Tests will run.
Adding test dependencies to package.json. Doesn't appear to work.

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

Trying to use codesandbox.io to complete a job application test.
Cannot execute any JEST tests.

To Reproduce

Create a static test and add any basic JEST test.js for example (not mine)
https://codesandbox.io/s/2xkx9mv8pp?file=/index.test.ts

Link to sandbox: link (optional)

https://codesandbox.io/s/2xkx9mv8pp?file=/index.test.ts

Your Environment

Software Name/Version
Сodesandbox latest
Browser Chrome
Operating System Win10
@CompuIves
Copy link
Member

Very good that you mention this. With the static template, everything is static, we don't run a bundler or something like a test suite. Because of this, the tests do not work. We should remove the test tab for this template. I would recommend to use the vanilla template to get an experience close to static but with testing enabled: https://codesandbox.io/s/vanilla.

@wwwmonkey
Copy link
Author

All good. Appreciate the info and reasoning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants