1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

[EC-423] Fix unit tests (#3265)

* Create base jest.config file

* Fix various tests that were broken

* Add maxWorkers to jest config

* Undo change to testEnvironment

* Enable tsconfig.spec.json
This commit is contained in:
Thomas Rittson
2022-08-11 11:35:08 +10:00
committed by GitHub
parent 0602d97358
commit 4a1c3eb1ec
31 changed files with 81 additions and 55 deletions

View File

@@ -2,12 +2,12 @@ const { pathsToModuleNameMapper } = require("ts-jest");
const { compilerOptions } = require("./tsconfig");
const sharedConfig = require("../../libs/shared/jest.config.base");
module.exports = {
collectCoverage: true,
coverageReporters: ["html", "lcov"],
coverageDirectory: "coverage",
...sharedConfig,
preset: "jest-preset-angular",
setupFilesAfterEnv: ["<rootDir>/test.config.ts"],
setupFilesAfterEnv: ["<rootDir>/test.setup.ts"],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, {
prefix: "<rootDir>/",
}),