You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `rs test` command uses [Rstest](https://rstest.rs/guide/basic/cli) to run tests.
4
+
5
+
## Usage
6
+
7
+
```bash
8
+
rs test [command] [...filters] [options]
9
+
```
10
+
11
+
The command loads the test configuration registered with [`define.test()`](../configuration#define-test).
12
+
13
+
## Options
14
+
15
+
`rs test` supports the same test runtime options and filters as Rstest. See the [Rstest CLI documentation](https://rstest.rs/guide/basic/cli#cli-options) and [Filtering tests](https://rstest.rs/guide/basic/test-filter) for details.
16
+
17
+
Examples:
18
+
19
+
```bash
20
+
# Run a specific test file
21
+
rs test tests/foo.test.ts
22
+
23
+
# Run tests with names containing "login"
24
+
rs test -t login
25
+
26
+
# Collect code coverage
27
+
rs test --coverage
28
+
```
29
+
30
+
## Subcommands
31
+
32
+
### run
33
+
34
+
[`rs test run`](https://rstest.rs/guide/basic/cli#rstest-run) runs matching tests once without watch mode. It is suitable for CI environments.
35
+
36
+
```bash
37
+
rs test run
38
+
```
39
+
40
+
### watch
41
+
42
+
[`rs test watch`](https://rstest.rs/guide/basic/cli#rstest-watch) reruns related tests when a test file or its dependencies change.
43
+
44
+
```bash
45
+
rs test watch
46
+
```
47
+
48
+
### list
49
+
50
+
[`rs test list`](https://rstest.rs/guide/basic/cli#rstest-list) lists matching tests without running them.
51
+
52
+
```bash
53
+
rs test list
54
+
```
55
+
56
+
### merge-reports
57
+
58
+
[`rs test merge-reports`](https://rstest.rs/guide/basic/cli#rstest-merge-reports) merges blob reports generated by multiple test shards.
59
+
60
+
```bash
61
+
rs test merge-reports
62
+
```
63
+
64
+
### init
65
+
66
+
[`rs test init`](https://rstest.rs/guide/basic/cli#rstest-init) creates starter files for a supported Rstest project type.
67
+
68
+
```bash
69
+
rs test init browser
70
+
```
4
71
5
72
## Configuration
6
73
7
-
See [`define.test()`](../configuration#define-test).
74
+
Configure tests through [`define.test()`](../configuration#define-test) in the [Rstack configuration file](/guide/configuration#configuration-file). It accepts the standard [Rstest configuration](https://rstest.rs/config/):
0 commit comments