diff options
author | 2023-05-21 01:20:21 -0700 | |
---|---|---|
committer | 2023-05-21 01:20:21 -0700 | |
commit | a29ee9f9a28746fe64c87b7f81c81110d423ec8e (patch) | |
tree | 76f062b9ac13e553eb49aa0deb7fc14adffb1dd5 /docs/test | |
parent | 7ad1fc4f8ffc172ff538d64089ded3d952f1fd1a (diff) | |
download | bun-a29ee9f9a28746fe64c87b7f81c81110d423ec8e.tar.gz bun-a29ee9f9a28746fe64c87b7f81c81110d423ec8e.tar.zst bun-a29ee9f9a28746fe64c87b7f81c81110d423ec8e.zip |
Update extending.md
Diffstat (limited to 'docs/test')
-rw-r--r-- | docs/test/extending.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/test/extending.md b/docs/test/extending.md index 6bd4ca83c..d13d1cafa 100644 --- a/docs/test/extending.md +++ b/docs/test/extending.md @@ -85,7 +85,7 @@ typeof globalThis.describe; // "undefined" typeof describe; // "function" ``` -This works via a transpiler integration in Bun. This transpiler plugin is only enabled inside test files and when preloading scripts. If you try to use these functions otherwise, you will get an error. +This works via a transpiler integration in Bun. When `describe`, `expect`, `it`, etc are used in a test file, the transpiler auto-imports from `bun:test`. This transpiler plugin is only enabled inside test files and when preloading scripts. If you try to use Jest globals in other files, you will get an error. Every `describe`, `test`, and `expect` is scoped to the current test file. Importing from `"bun:test"` creates a new scope. This means you can't use `describe` from one test file in another test file because belong to different scopes. |