aboutsummaryrefslogtreecommitdiff
path: root/docs/test/lifecycle.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/test/lifecycle.md')
-rw-r--r--docs/test/lifecycle.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/test/lifecycle.md b/docs/test/lifecycle.md
index ccb7ce85d..fd804c9bb 100644
--- a/docs/test/lifecycle.md
+++ b/docs/test/lifecycle.md
@@ -10,7 +10,7 @@ The test runner supports the following lifecycle hooks. This is useful for loadi
Perform per-test setup and teardown logic with `beforeEach` and `afterEach`.
```ts
-import { expect, test } from "bun:test";
+import { beforeEach, afterEach } from "bun:test";
beforeEach(() => {
console.log("running test.");
@@ -70,7 +70,7 @@ afterAll(() => {
Then use `--preload` to run the setup script before any test files.
```ts
-bun test --preload ./setup.ts
+$ bun test --preload ./setup.ts
```
To avoid typing `--preload` every time you run tests, it can be added to your `bunfig.toml`: