Skip to content

Commit

Permalink
docs: improve (describe|test).only description (#1826)
Browse files Browse the repository at this point in the history
* docs: improve (describe|test).only description

* Apply suggestions from code review

Co-authored-by: Vladimir <sleuths.slews0s@icloud.com>
  • Loading branch information
Dragomir-Ivanov and sheremet-va committed Aug 11, 2022
1 parent 8eddd5a commit 10232f3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ In Jest, `TestFunction` can also be of type `(done: DoneCallback) => void`. If t
})
```

Sometimes it is very useful to run `only` tests in a certain file, ignoring all other tests from the whole test suite, which pollute the output.

In order to do that run `vitest` with specific file containing the tests in question.
```
# vitest interesting.test.ts
```

### test.concurrent

- **Type:** `(name: string, fn: TestFunction, timeout?: number) => void`
Expand Down Expand Up @@ -290,6 +297,13 @@ When you use `test` in the top level of file, they are collected as part of the
})
```

Sometimes it is very useful to run `only` tests in a certain file, ignoring all other tests from the whole test suite, which pollute the output.

In order to do that run `vitest` with specific file containing the tests in question.
```
# vitest interesting.test.ts
```

### describe.concurrent

- **Type:** `(name: string, fn: TestFunction, timeout?: number) => void`
Expand Down

0 comments on commit 10232f3

Please sign in to comment.