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

[workflow] could run a single test #4767

Closed
TrickyPi opened this issue Dec 23, 2022 · 5 comments · Fixed by #4769
Closed

[workflow] could run a single test #4767

TrickyPi opened this issue Dec 23, 2022 · 5 comments · Fixed by #4769

Comments

@TrickyPi
Copy link
Member

TrickyPi commented Dec 23, 2022

Feature Use Case

Currently, we don't have a command to run a single test, e.g. only run the test/function/samples/associate-getter-return-values test. Now, for running a single test, i have to comment some tests in test/test.js and write some conditional judgment in runSamples function in test/util.js to filter other tests, so if we can support this, the debugging experience will be better.

Feature Proposal

I think we can extend current test command, e.g. the test command can accept a folder path, i.e. npm run test:only test/function/samples/associate-getter-return-values, or we can add a new test command to achieve this.

@lukastaegert
Copy link
Member

It is just missing documentation. Add solo: true you a _config.js file

@lukastaegert
Copy link
Member

But if you think it is more useful to your workflow, we could also add command line parameters. Another thing I could get behind is to allow renaming folders to <folderName>.only and interpret this as a describe.only/it.only. This would also allow to run only sets of tests based on folder structure (as samples can be arbitrarily nested)

@TrickyPi
Copy link
Member Author

TrickyPi commented Dec 24, 2022

It is just missing documentation. Add solo: true you a _config.js file

Oh, it's awesome, I think it's useful enough to me. Could we add this to CONTRIBUTING.md?

@lukastaegert
Copy link
Member

Please do!

@rollup-bot
Copy link
Collaborator

This issue has been resolved via #4769 as part of rollup@3.9.0. You can test it via npm install rollup.

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

Successfully merging a pull request may close this issue.

3 participants