karma-runner / karma-runner/karma

Proposal: command line support to run focused tests

Open
#2,941 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Hello, this question comes across every time when I work with Karma+Jasmine in my Angular projects. Yes, we have `fit` and `fdescribe` but I personally find this error-prone solution, where you have to modify test files and revert it back after changes.

Last time I came to a solution where I modify karma.config for the interested set of files. Meanwhile, I have some experience with Jest and I found its [files pattern](https://facebook.github.io/jest/docs/en/cli.html) very lightweight and elegant. You just type `jest yourcomponent` and it runs matching test files.

I want to propose to add this feature to Karma as well, because it's really needed and missed.

Contributor guide

Open the contributing guide

Research direction

Start by reading Karma's command-line handling and the karma.config configuration path, then compare the proposed file-pattern behavior with the linked Jest CLI documentation. Done means users can provide a pattern from the command line and Karma runs only matching test files, with coverage for the new behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.