mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
Conflict resolution
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { webcrypto } from "crypto";
|
||||
|
||||
import { toEqualBuffer } from "./spec";
|
||||
import { toAlmostEqual } from "./spec/matchers/to-almost-equal";
|
||||
|
||||
Object.defineProperty(window, "crypto", {
|
||||
value: webcrypto,
|
||||
@@ -10,8 +11,15 @@ Object.defineProperty(window, "crypto", {
|
||||
|
||||
expect.extend({
|
||||
toEqualBuffer: toEqualBuffer,
|
||||
toAlmostEqual: toAlmostEqual,
|
||||
});
|
||||
|
||||
export interface CustomMatchers<R = unknown> {
|
||||
toEqualBuffer(expected: Uint8Array | ArrayBuffer): R;
|
||||
/**
|
||||
* Matches the expected date within an optional ms precision
|
||||
* @param expected The expected date
|
||||
* @param msPrecision The optional precision in milliseconds
|
||||
*/
|
||||
toAlmostEqual(expected: Date, msPrecision?: number): R;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user