mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-05 23:53:21 +00:00
18 lines
327 B
TypeScript
18 lines
327 B
TypeScript
import { webcrypto } from "crypto";
|
|
|
|
import { toEqualBuffer } from "./spec";
|
|
|
|
Object.defineProperty(window, "crypto", {
|
|
value: webcrypto,
|
|
});
|
|
|
|
// Add custom matchers
|
|
|
|
expect.extend({
|
|
toEqualBuffer: toEqualBuffer,
|
|
});
|
|
|
|
export interface CustomMatchers<R = unknown> {
|
|
toEqualBuffer(expected: Uint8Array | ArrayBuffer): R;
|
|
}
|