1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-03-01 03:31:15 +01:00
bitwarden-browser/libs/vault/test.setup.ts
Oscar Hinton cec117459b
[PM-18599] Forbid unknown property and element in tests (#13556)
Fail tests when relying on unknownProperties or unknownElements. Existing instances are whitelist and have tickets created and assigned to the relevant teams.
2025-02-25 14:02:19 -08:00

29 lines
596 B
TypeScript

import { webcrypto } from "crypto";
import "@bitwarden/ui-common/setup-jest";
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,
});