Integrate crabrl parser into taxonomy hydration
This commit is contained in:
33
test/bun-test-shim.ts
Normal file
33
test/bun-test-shim.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import {
|
||||
afterAll,
|
||||
afterEach,
|
||||
beforeAll,
|
||||
beforeEach,
|
||||
describe,
|
||||
expect,
|
||||
it,
|
||||
vi,
|
||||
} from "vitest";
|
||||
|
||||
type Mock = typeof vi.fn & {
|
||||
module: typeof vi.mock;
|
||||
};
|
||||
|
||||
const mock = Object.assign(
|
||||
((implementation?: Parameters<typeof vi.fn>[0]) =>
|
||||
vi.fn(implementation)) as typeof vi.fn,
|
||||
{
|
||||
module: vi.mock,
|
||||
},
|
||||
) as Mock;
|
||||
|
||||
export {
|
||||
afterAll,
|
||||
afterEach,
|
||||
beforeAll,
|
||||
beforeEach,
|
||||
describe,
|
||||
expect,
|
||||
it,
|
||||
mock,
|
||||
};
|
||||
6
test/vitest.setup.ts
Normal file
6
test/vitest.setup.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
const bunGlobal = ((globalThis as { Bun?: Record<string, unknown> }).Bun ??=
|
||||
{});
|
||||
|
||||
if (typeof bunGlobal.sleep !== "function") {
|
||||
bunGlobal.sleep = async (_ms: number) => {};
|
||||
}
|
||||
Reference in New Issue
Block a user