Skip to content

Static template JEST testing is broken #5726

Closed

Description

@wwwmonkey

🐛 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

Activity

  1. CompuIves commented on May 7, 2021

    @CompuIves
    Contributor

    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.

  2. wwwmonkey commented on May 7, 2021

    @wwwmonkey
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions