mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-16 10:45:20 +01:00
4a1c3eb1ec
* Create base jest.config file * Fix various tests that were broken * Add maxWorkers to jest config * Undo change to testEnvironment * Enable tsconfig.spec.json
29 lines
595 B
TypeScript
29 lines
595 B
TypeScript
import { webcrypto } from "crypto";
|
|
import "jest-preset-angular/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,
|
|
});
|