diff options
author | 2023-05-21 00:49:55 -0700 | |
---|---|---|
committer | 2023-05-21 00:49:55 -0700 | |
commit | 40de6d8cda0f82e457c993f739d64715bcd8ef17 (patch) | |
tree | 4f5371e115db0e32b76bf1ee20609e019ae8b7f5 /docs/test | |
parent | d5c9e5ee79e7b8eae0a8ff2d42d1f38319add0dd (diff) | |
download | bun-40de6d8cda0f82e457c993f739d64715bcd8ef17.tar.gz bun-40de6d8cda0f82e457c993f739d64715bcd8ef17.tar.zst bun-40de6d8cda0f82e457c993f739d64715bcd8ef17.zip |
Update extending.md
Diffstat (limited to 'docs/test')
-rw-r--r-- | docs/test/extending.md | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/docs/test/extending.md b/docs/test/extending.md index d0c700a64..ef95a40e1 100644 --- a/docs/test/extending.md +++ b/docs/test/extending.md @@ -1,5 +1,3 @@ -# Lifecycle hooks - 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 } @@ -64,7 +62,7 @@ The following lifecycle hooks are available in `--preload`: | `afterEach` | Runs after each test. | | `afterAll` | Runs once after all tests. | -# Configuration +## Configuration To save yourself from having to type `--preload` every time you run tests, you can add it to your `bunfig.toml`: @@ -73,10 +71,10 @@ To save yourself from having to type `--preload` every time you run tests, you c preload = ["preloaded.ts"] ``` -# Loaders & Resolvers +## Loaders & Resolvers {% note %} -Plugin support is not implemented yet. There is a bug and this feature is not working. +Plugin support is not implemented yet. **There is a bug and this feature is not working**. {% /note %} `bun:test` supports the same plugin API as bun's runtime and bun's bundler. See [Plugins](docs/bundler/plugins#usage) for more information. |