diff options
author | 2023-02-09 00:30:40 -0800 | |
---|---|---|
committer | 2023-02-09 00:30:40 -0800 | |
commit | 523b112945d20f7aa59ad3de327348cc77353a1f (patch) | |
tree | 9f5fd5253a797f6391d4dd947d723d77b707eb9b /test/bun.js/jest-doesnt-auto-import.js | |
parent | 8aa29040e6d79e80bc7e913bfb457b273dbec1a4 (diff) | |
download | bun-523b112945d20f7aa59ad3de327348cc77353a1f.tar.gz bun-523b112945d20f7aa59ad3de327348cc77353a1f.tar.zst bun-523b112945d20f7aa59ad3de327348cc77353a1f.zip |
[bun:test] Auto-import jest globals in test files
Diffstat (limited to 'test/bun.js/jest-doesnt-auto-import.js')
-rw-r--r-- | test/bun.js/jest-doesnt-auto-import.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/bun.js/jest-doesnt-auto-import.js b/test/bun.js/jest-doesnt-auto-import.js new file mode 100644 index 000000000..4d4a02b37 --- /dev/null +++ b/test/bun.js/jest-doesnt-auto-import.js @@ -0,0 +1,12 @@ +export function getJestGlobals() { + return { + describe: typeof describe === "function" ? describe : undefined, + it: typeof it === "function" ? it : undefined, + test: typeof test === "function" ? test : undefined, + expect: typeof expect === "function" ? expect : undefined, + beforeAll: typeof beforeAll === "function" ? beforeAll : undefined, + beforeEach: typeof beforeEach === "function" ? beforeEach : undefined, + afterAll: typeof afterAll === "function" ? afterAll : undefined, + afterEach: typeof afterEach === "function" ? afterEach : undefined, + }; +} |