aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/test-auto-import-jest-globals.test.js
blob: 5baeae43e9170d58fc8f69f0ee93a883947f8384 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
test("Jest auto imports", () => {
  expect(true).toBe(true);
  expect(typeof describe).toBe("function");
  expect(typeof it).toBe("function");
  expect(typeof test).toBe("function");
  expect(typeof expect).toBe("function");
  expect(typeof beforeAll).toBe("function");
  expect(typeof beforeEach).toBe("function");
  expect(typeof afterAll).toBe("function");
  expect(typeof afterEach).toBe("function");
});

test("Jest's globals aren't available in every file", async () => {
  const jestGlobals = await import("./jest-doesnt-auto-import.js");

  expect(typeof jestGlobals.describe).toBe("undefined");
  expect(typeof jestGlobals.it).toBe("undefined");
  expect(typeof jestGlobals.test).toBe("undefined");
  expect(typeof jestGlobals.expect).toBe("undefined");
  expect(typeof jestGlobals.beforeAll).toBe("undefined");
  expect(typeof jestGlobals.beforeEach).toBe("undefined");
  expect(typeof jestGlobals.afterAll).toBe("undefined");
  expect(typeof jestGlobals.afterEach).toBe("undefined");
});
itle='2022-04-29 05:02:01 -0700'>2022-04-29[bun ffi] support `i32`, `i8`, `u8`, `u16`, `i16`, `u32`, `bool`Gravatar Jarred Sumner 5-159/+260 2022-04-29more tests for bufferGravatar Jarred Sumner 1-1/+165 2022-04-29add more to buffer implementationGravatar Jarred Sumner 14-157/+783 2022-04-29ffi test codeGravatar Jarred Sumner 2-26/+247 2022-04-29wipGravatar Jarred Sumner 10-16/+312 2022-04-29commit moreGravatar Jarred Sumner 3-0/+81