1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-30 22:41:33 +01:00
bitwarden-browser/libs/admin-console/test.setup.ts
Thomas Rittson 8c13ea894b
[PM-16917] Remove jest-extended dependency (#12798)
* add toContainPartialObjects matcher (replacing toIncludeAllPartialMembers from jest-extended)
* replace jest-extended matchers with equivalent default matchers
2025-01-15 10:43:26 -05:00

33 lines
678 B
TypeScript

import { webcrypto } from "crypto";
import { addCustomMatchers } from "@bitwarden/common/spec";
import "jest-preset-angular/setup-jest";
addCustomMatchers();
Object.defineProperty(window, "CSS", { value: null });
Object.defineProperty(window, "getComputedStyle", {
value: () => {
return {
display: "none",
appearance: ["-webkit-appearance"],
};
},
});
Object.defineProperty(document, "doctype", {
value: "<!DOCTYPE html>",
});
Object.defineProperty(document.body.style, "transform", {
value: () => {
return {
enumerable: true,
configurable: true,
};
},
});
Object.defineProperty(window, "crypto", {
value: webcrypto,
});