-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Description
Currently when you run npm test it runs all tests (either for all bots, or for a single bot if the BOT env var is set).
It would be convenient to be able to run individual files with npm test foo and have it run any of the test files that contain "foo".
To do this, we need to:
- ensure
npm testpasses any additional args tonpm test-only - ensure
npm test-onlypasses the additional args to./out/src/test/test_all.js(and ideally skipnpm run test-grammarif args are passed) - have
test_all.ts(which compiles totest_all.js) pass these args in an env variable when invokingvstest.runTests - read the env variable in
test_runner.ts(which is imported into each test suitesindex.tsto tun tests) and include it in the pattern used for locating the test files
To verify this is done, set BOT=dart and try tunning some of the test files like:
npm test autolaunch
This should run only the files from dart/debug/autolaunch.test.ts.
Running npm test without any args (but still with BOT=dart) should run all of the standard Dart test suite tests.
The changes must work for all platforms, including Windows.
Copilot