1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-05 23:53:21 +00:00

Upgrade the jest test suite to match the clients (#379)

* Upgrade the jest test suite to match the clients

* Update makeStaticByteArray
This commit is contained in:
Oscar Hinton
2023-12-12 13:45:12 +01:00
committed by GitHub
parent 36ab2953b5
commit 1546cc2012
24 changed files with 379 additions and 107 deletions

View File

@@ -1,16 +1,15 @@
const { pathsToModuleNameMapper } = require("ts-jest/utils");
const { pathsToModuleNameMapper } = require("ts-jest");
const { compilerOptions } = require("./tsconfig");
const { compilerOptions } = require("../shared/tsconfig.libs");
const sharedConfig = require("../shared/jest.config.angular");
/** @type {import('jest').Config} */
module.exports = {
name: "angular",
displayName: "angular tests",
...sharedConfig,
displayName: "libs/angular tests",
preset: "jest-preset-angular",
testMatch: ["**/+(*.)+(spec).+(ts)"],
setupFilesAfterEnv: ["<rootDir>/spec/test.ts"],
collectCoverage: true,
coverageReporters: ["html", "lcov"],
coverageDirectory: "coverage",
setupFilesAfterEnv: ["<rootDir>/test.setup.ts"],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, {
prefix: "<rootDir>/",
}),