1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +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

15
apps/web/jest.config.js Normal file
View File

@@ -0,0 +1,15 @@
const { pathsToModuleNameMapper } = require("ts-jest");
const { compilerOptions } = require("./tsconfig");
module.exports = {
collectCoverage: true,
coverageReporters: ["html", "lcov"],
coverageDirectory: "coverage",
preset: "jest-preset-angular",
setupFilesAfterEnv: ["<rootDir>/test.config.ts"],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, {
prefix: "<rootDir>/",
}),
modulePathIgnorePatterns: ["jslib"],
};