1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

[SG-487] Web component unit tests (#3189)

* Configure jest for web

* attempt to fix linter fule preventing angular core imports

* trial initiation tests

* small trial initiation component fix

* Small naming fix in tests
This commit is contained in:
Robyn MacCallum
2022-08-04 10:19:31 -04:00
committed by GitHub
parent 1e1a0b1481
commit 34f33ebb54
7 changed files with 332 additions and 3 deletions

23
apps/web/test.config.ts Normal file
View File

@@ -0,0 +1,23 @@
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,
};
},
});