aboutsummaryrefslogtreecommitdiff
path: root/docs/guides/test/skip-tests.md
blob: c067c8fc7a7859a05a316612971b5e08a5b8b9c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
name: Skip tests with the Bun test runner
---

To skip a test with the Bun test runner, use the `test.skip` function.

```ts-diff
test.skip("unimplemented feature", ()=>{
  expect(Bun.isAwesome()).toBe(true);
});
```

---

Running `bun test` will not execute this test. It will be marked as skipped in the terminal output.

```sh
$ bun test

test.test.ts:
✓ add [0.03ms]
✓ multiply [0.02ms]
» unimplemented feature

 2 pass
 1 skip
 0 fail
 2 expect() calls
Ran 3 tests across 1 files. [74.00ms]
```

---

See also:

- [Mark a test as a todo](/guides/test/todo-tests)
- [Docs > Test runner > Writing tests](/docs/test/writings-tests)