mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
26 lines
578 B
TypeScript
26 lines
578 B
TypeScript
// A fixture that tests that Jest globals are injected into the global scope
|
|
// even when the file is NOT the entrypoint of the test.
|
|
|
|
test.each([
|
|
["expect", expect],
|
|
["test", test],
|
|
["describe", describe],
|
|
["it", it],
|
|
["beforeEach", beforeEach],
|
|
["afterEach", afterEach],
|
|
["beforeAll", beforeAll],
|
|
["afterAll", afterAll],
|
|
["jest", jest],
|
|
])("that %s is defined", (_, global) => {
|
|
expect(global).toBeDefined();
|
|
});
|
|
|
|
expect.extend({
|
|
toBeOne(actual) {
|
|
return {
|
|
pass: actual === 1,
|
|
message: () => `expected ${actual} to be 1`,
|
|
};
|
|
},
|
|
});
|