-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Filter integration tests from npm command #7768
Conversation
The problem with using Naming wise, I'm referring to the 'visualize app tests' vs. the 'area chart test suite' which contains several tests as an example. We should be able to run one suite, but not individual tests within a suite because they are not all atomic (it would be too slow to get through the tests if they were). |
LGTM |
Awesome 💯 |
thanks @jbudz this will help greatly! |
Filter integration tests from npm command Former-commit-id: d5dde76
This lets you
npm run test:ui -- --grep=foo
instead of running the intern bin directly. I didn't add functionalSuites because it needs the main index file for babel transpilation now.edit: added functionalSuites for api tests, and an 'apps' filter too.
Using grep alone will not prevent the before block of every test from running, so it can be useful to filter by suite. Currently, filtering tests by suite doesn't work because tests are all loaded together, ran through babel, and then passed in as one suite. This allows us to filter test runs by application.
Usage:
and with grep:
An alternative is to split tests back out into individual suites and run each suite through babel, but that adds some boilerplate to each test.