mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Update extending.md
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
Like the runtime, `bun:test` also supports `--preload` scripts. These scripts are loaded before any tests are run. This is useful for setting up test fixtures, mocking, and configuring the test environment.
|
||||
|
||||
{% codetab }
|
||||
{% codetabs }
|
||||
|
||||
```ts#preloaded.ts
|
||||
import { beforeAll, beforeEach, afterEach, afterAll } from "bun:test";
|
||||
@@ -22,7 +22,7 @@ afterAll(() => {
|
||||
});
|
||||
```
|
||||
|
||||
{% /codetab %}
|
||||
{% /codetabs %}
|
||||
|
||||
Test file:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user