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:
17
components/jest.config.js
Normal file
17
components/jest.config.js
Normal 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>/",
|
||||
}),
|
||||
};
|
||||
Reference in New Issue
Block a user