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:
29
test.setup.ts
Normal file
29
test.setup.ts
Normal 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,
|
||||
});
|
||||
Reference in New Issue
Block a user