aboutsummaryrefslogtreecommitdiff
path: root/packages/bun-internal-test/types/bun-test.d.ts
blob: 13d3b06ba8612a241746ae7d75476774b9654ed7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import type { Expect, test, describe, beforeAll, beforeEach, afterAll, afterEach } from "bun:test";

export type BunExpect = (value: unknown) => Expect;
export type BunDescribe = typeof describe;
export type BunTest = typeof test;
export type BunHook = typeof beforeAll | typeof beforeEach | typeof afterAll | typeof afterEach;

export type TestContext = {
  expect: BunExpect;
  describe: BunDescribe;
  test: BunTest;
  beforeAll: BunHook;
  beforeEach: BunHook;
  afterAll: BunHook;
  afterEach: BunHook;
};

declare module "bun" {
  function jest(path: string): TestContext;
}