mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-15 15:53:41 +00:00
Upgrade the jest test suite to match the clients (#379)
* Upgrade the jest test suite to match the clients * Update makeStaticByteArray
This commit is contained in:
17
jslib/common/test.setup.ts
Normal file
17
jslib/common/test.setup.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user