1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-05 23:53:21 +00:00

[AC-1743] pt. 2.5 ⮕ Fix the unit tests for good (#398)

* Remove uneeded redirects to a tsconfig.spec.json

* Got the tests running again

* Delete webCryptoFunctionService

* Delete unused utils tests

* Add a test workflow
This commit is contained in:
Addison Beck
2024-01-12 13:05:35 -06:00
committed by GitHub
parent d1cb92b5e7
commit 39ed9359fe
27 changed files with 90 additions and 1300 deletions

29
test.setup.ts Normal file
View File

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