Feature request: Add tests panel support
See original GitHub issueIssue Description
Tell us how you think we can improve Sandpack
Packages affected
- sandpack-client
- sandpack-react
What is this feature?
Would it be possible to support test files? Currently on codesandbox.io I can configure the sandbox view to show the tests
panel which can run the tests.
How would your idea work?
Much like the sandpack-react
does currently but with an additional view
option which supports tests
that instead of rendering the React component into the DOM it would run the test file with jest and display the results.
Do you have any examples of how you would like to see us implement it?
Sorry no real examples but the use case I have in mind is for a jest-extended docs site with an embedded repl (powered by Sandpack) that can run the examples for each matcher.
This would be preferable to creating a codesandbox per matcher and manually embedding it.
Here’s an example of what I’ve currently configured in a sandbox if it’s of any help.
I’m more than happy to get involved with building this if it’s of value to the project, would just need some pointers on where to begin 😆
Issue Analytics
- State:
- Created a year ago
- Reactions:7
- Comments:6 (5 by maintainers)
Thanks for your feedback, @mattphillips!
I have added your feature request to our internal backlog which we use to prioritize what to build next. We can’t make any promises about the timing, but it’s on the list!
For others landing on this issue, feel free to add more context or simply leave a thumbs up 👍 on this comment if you find this feature useful.
Sorry I meant to say: I’m curious to know what kind of feature the Test component cannot miss? But you got the point.
Thanks for leaving your feedback!