-
Notifications
You must be signed in to change notification settings - Fork 366
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
feat(SandpackTests): Add SandpackTests component #562
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit feaf291:
|
Hey @danilowoz, I've just been thinking about writing some docs for this PR and it got me wondering if we would want a I've had a quick look into how the templates work and it seems they only show the An extension on this is that we could also add an example test to each template and an option whether to display the Curious to hear your thoughts? 😄 |
@mattphillips loved the idea! Let's do it! So, here's a quick summary of what's missing:
|
Yeah that summary looks good to me 👍 One other thing we could do (could be in another PR) is to add a test example to each of the other templates |
Changelog
|
…ndpack into mp/sandpack-test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 🚀 🚀 🚀 🚀 🚀
Open in CodeSandbox Web Editor | VS Code
What kind of change does this pull request introduce?
SandpackTests
component.SandpcakMessage
type. Type defs have been adapted from: codeandbox tests componentpackage-build-stats
dependency to a newer version. I was unable to build the project because of a node-sass issue related to the older version of this package (see related)What is the current behavior?
This feature does not exist in Sandpack but builds on top of codesandbox's tests panel.
It is also the result of this Tweet
Closes #112
What is the new behavior?
The component handles:
What steps did you take to test this? This is required before we can merge, make sure to test the flow you've updated.
Checklist
Todo before merging
Future Todos
I'll get to these once this PR is ready to merge.
verbose
toggle. (Am still new tostitches
and it doesn't feel that intuitive 😅).jest-lite
in codesandbox doesn't supportjsx
files but should so a PR is needed to change this linejest-lite
in codesandbox doesn't correctly handle focussed tests (.only
). It treats focussed test as the only test for all files when it should be scoped to adescribe
level.onComplete
callback toSandpackTests
for consumers to listen for resultsstyle
/className
to customise the rootSandpackStack
.Overall this is pretty much done but I still have a few bits to do. I think now would be a good time to get some eyes on this for some feedback.
cc/ @CompuIves @danilowoz PR as promised 😃