1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-06-28 10:55:27 +02:00
bitwarden-browser/libs/auth/test.setup.ts
Will Martin f43272f243
[PM-3172] create @bitwarden/auth lib (#5906)
* scaffold new lib

* update jest config

* update tsconfig

* add readme

* update tailwind config

* update package-lock

* update tsconfigs

* update jest displayName

* update tsconfig.libs.json

* fix alias glob

* update package lock

* add readme to whitelist-capital-letters

* update CODEOWNERS

* remove test utils

* update eslint rules

* alphabetize eslint and tsconfig

* sort jest config

---------

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2023-08-08 09:37:25 -04:00

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,
});