Skip to content

Commit

Permalink
Add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mzhubail committed Nov 28, 2024
1 parent dbce189 commit beed808
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/guide/filtering.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ basic/foo.test.ts

You can also use the `-t, --testNamePattern <pattern>` option to filter tests by full name. This can be helpful when you want to filter by the name defined within a file rather than the filename itself.

You can also specify the test by filename and line number:

```bash
$ vitest basic/foo.test.ts:10
```

::: warning
Note that you have to specify the full filename, and specify the exact line number, i.e. you can't do

```bash
$ vitest foo:10
$ vitest basic/foo.test.ts:10-25
```

:::

## Specifying a Timeout

You can optionally pass a timeout in milliseconds as a third argument to tests. The default is [5 seconds](/config/#testtimeout).
Expand Down

0 comments on commit beed808

Please sign in to comment.