mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 13:23:34 +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.
28 lines
794 B
JavaScript
28 lines
794 B
JavaScript
/* eslint-env node */
|
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
const { createCjsPreset } = require("jest-preset-angular/presets");
|
|
|
|
const presetConfig = createCjsPreset({
|
|
tsconfig: "<rootDir>/tsconfig.spec.json",
|
|
astTransformers: {
|
|
before: ["<rootDir>/../../libs/shared/es2020-transformer.ts"],
|
|
},
|
|
diagnostics: {
|
|
ignoreCodes: ["TS151001"],
|
|
},
|
|
});
|
|
|
|
/** @type {import('jest').Config} */
|
|
module.exports = {
|
|
...presetConfig,
|
|
testMatch: ["**/+(*.)+(spec).+(ts)"],
|
|
|
|
testPathIgnorePatterns: [
|
|
"/node_modules/", // default value
|
|
".*.type.spec.ts", // ignore type tests (which are checked at compile time and not run by jest)
|
|
],
|
|
|
|
// Improves on-demand performance, for watches prefer 25%, overridable by setting --maxWorkers
|
|
maxWorkers: "50%",
|
|
};
|