1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 15:23:33 +00:00

Migrate components to use jest (#793)

* Migrate components to use jest (tests fail)

* Fix failing tests

* Fix linting errors
This commit is contained in:
Oscar Hinton
2022-05-12 17:33:49 +02:00
committed by GitHub
parent 1370006f6e
commit de2eb0359b
11 changed files with 10867 additions and 240 deletions

17
components/jest.config.js Normal file
View File

@@ -0,0 +1,17 @@
const { pathsToModuleNameMapper } = require("ts-jest");
const { compilerOptions } = require("./tsconfig");
module.exports = {
name: "angular",
displayName: "component library tests",
preset: "jest-preset-angular",
testMatch: ["**/+(*.)+(spec).+(ts)"],
setupFilesAfterEnv: ["<rootDir>/spec/test.ts"],
collectCoverage: true,
coverageReporters: ["html", "lcov"],
coverageDirectory: "coverage",
moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, {
prefix: "<rootDir>/",
}),
};