expo-crypto@56 introduced a native AES class that throws in Jest's Node.js environment on import. Mock the functions actually used (getRandomBytes, digestStringAsync) so the api-client test suite can run. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5 lines
279 B
TypeScript
5 lines
279 B
TypeScript
export const CryptoDigestAlgorithm = { SHA256: "SHA-256" } as const;
|
|
export const CryptoEncoding = { BASE64: "base64" } as const;
|
|
|
|
export const getRandomBytes = jest.fn((size: number) => new Uint8Array(size));
|
|
export const digestStringAsync = jest.fn(async () => "mock-digest");
|