Skip to content

Commit

Permalink
docs: make grep behaviour clearer
Browse files Browse the repository at this point in the history
It is not self-explanatory that grep will recognize whether the input string is a regex or not. In the case of a string it sanitizes it to turn it into a regex.
  • Loading branch information
flavianh authored and Jonathan Ginsburg committed Apr 25, 2022
1 parent 963269d commit 819d42d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@ module.exports = function(config) {
}
```

If you want to run only some tests matching a given pattern you can do this in the following way
If you want to run only some tests whose name match a given pattern you can do this in the following way

```bash
$ karma start &
$ karma run -- --grep=<pattern>
```

or
where pattern is either a string (e.g `--grep=#slow` runs tests containing "#slow") or a Regex (e.g `--grep=/^(?!.*#slow).*$/` runs tests _not_ containing "#slow").

You can also pass it to `karma.config.js`:

```js
module.exports = function(config) {
Expand Down

0 comments on commit 819d42d

Please sign in to comment.