mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
Upgrade Angular to v19 using the update guide. - Add `standalone: false` to any missed component in stories or tests. - Update jest.config to follow the new best practices.
27 lines
792 B
JavaScript
27 lines
792 B
JavaScript
const { pathsToModuleNameMapper } = require("ts-jest");
|
|
|
|
const { compilerOptions } = require("./tsconfig");
|
|
|
|
const sharedConfig = require("../../libs/shared/jest.config.angular");
|
|
|
|
/** @type {import('jest').Config} */
|
|
module.exports = {
|
|
...sharedConfig,
|
|
setupFilesAfterEnv: ["<rootDir>/test.setup.ts"],
|
|
moduleNameMapper: {
|
|
// Replace ESM SDK with Node compatible SDK
|
|
"@bitwarden/common/platform/services/sdk/default-sdk-client-factory":
|
|
"<rootDir>/../../libs/common/spec/jest-sdk-client-factory",
|
|
...pathsToModuleNameMapper(
|
|
{
|
|
// lets us use @bitwarden/common/spec in web tests
|
|
"@bitwarden/common/spec": ["../../libs/common/spec"],
|
|
...(compilerOptions?.paths ?? {}),
|
|
},
|
|
{
|
|
prefix: "<rootDir>/",
|
|
},
|
|
),
|
|
},
|
|
};
|