mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-30 22:41:33 +01:00
8c13ea894b
* add toContainPartialObjects matcher (replacing toIncludeAllPartialMembers from jest-extended) * replace jest-extended matchers with equivalent default matchers
33 lines
678 B
TypeScript
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,
|
|
});
|