15 lines
387 B
TypeScript
15 lines
387 B
TypeScript
// Test setup to ensure clean global state
|
|
import { afterAll, beforeAll } from "bun:test";
|
|
|
|
// Store original crypto before any tests run
|
|
const originalCrypto = globalThis.crypto;
|
|
|
|
beforeAll(() => {
|
|
// Ensure we have a clean crypto object
|
|
globalThis.crypto = originalCrypto;
|
|
});
|
|
|
|
afterAll(() => {
|
|
// Restore original crypto after all tests
|
|
globalThis.crypto = originalCrypto;
|
|
}); |