@xswap-link/sdk
Version:
JavaScript SDK for XSwap platform
14 lines (11 loc) • 393 B
text/typescript
import { TextEncoder, TextDecoder } from "util";
import "@testing-library/jest-dom";
import fetchMock from "jest-fetch-mock";
fetchMock.enableMocks();
global.TextEncoder = TextEncoder;
// @ts-expect-error -- Type mismatch but it works at runtime
global.TextDecoder = TextDecoder;
// Mock crypto.randomUUID
Object.defineProperty(global.crypto, "randomUUID", {
value: () => "test-uuid",
});