karma-runner / karma-runner/karma
Performance-wise way to run all tests in test file
- Dominant language
- JavaScript
- Stars
- 12k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Currently, there is no good way to run all tests in a given test file.
The closest thing is to use `--grep=` option that will filter all available tests by the top level suite/test names. That's how it works for Jasmine and Mocha frameworks. The problem with such an approach is that all tests are evaluated at runtime anyway. This slows things down. For example, running a single fast test in a big project with many test files won't be as fast as it would be in the same project but having a single test file.
It'd be great to extend `karma run` API to add a new `--testFilePath` parameter. It could be consumed by IntelliJ/WebStorm. Related issue in IntelliJ/WebStorm: https://youtrack.jetbrains.com/issue/WEB-49930
Contributor guide
Research direction
Start by tracing the `karma run` API and the existing `--grep` option to understand where test files are selected and evaluated. Done means a `--testFilePath` parameter can run all tests in one specified file without evaluating unrelated test files, supporting the linked IntelliJ/WebStorm use case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100