From a29ee9f9a28746fe64c87b7f81c81110d423ec8e Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Sun, 21 May 2023 01:20:21 -0700 Subject: [PATCH] Update extending.md --- docs/test/extending.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/test/extending.md b/docs/test/extending.md index 6bd4ca83c5..d13d1cafa2 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.