mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[CL-525] Upgrade angular to v19 (#14815)
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.
This commit is contained in:
@@ -2,10 +2,23 @@ const { pathsToModuleNameMapper } = require("ts-jest");
|
||||
|
||||
const { compilerOptions } = require("../../../shared/tsconfig.spec");
|
||||
|
||||
const { createCjsPreset } = require("jest-preset-angular/presets");
|
||||
|
||||
// FIXME: Should use the shared config!
|
||||
const presetConfig = createCjsPreset({
|
||||
tsconfig: "<rootDir>/tsconfig.spec.json",
|
||||
astTransformers: {
|
||||
before: ["<rootDir>/../../../shared/es2020-transformer.ts"],
|
||||
},
|
||||
diagnostics: {
|
||||
ignoreCodes: ["TS151001"],
|
||||
},
|
||||
});
|
||||
|
||||
/** @type {import('jest').Config} */
|
||||
module.exports = {
|
||||
testMatch: ["**/+(*.)+(spec).+(ts)"],
|
||||
preset: "jest-preset-angular",
|
||||
...presetConfig,
|
||||
displayName: "tools/send-ui tests",
|
||||
setupFilesAfterEnv: ["<rootDir>/test.setup.ts"],
|
||||
moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, {
|
||||
prefix: "<rootDir>/../../",
|
||||
|
||||
Reference in New Issue
Block a user