1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

Conflict resolution

This commit is contained in:
Carlos Gonçalves
2024-04-02 17:18:45 +01:00
parent 8a1df6671a
commit 0c0c2039ed
699 changed files with 17230 additions and 8095 deletions

View File

@@ -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;
}