1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-09 05:00:10 +00:00
Files
browser/libs/shared/jest.config.angular.js
Matt Gibson cb6217acc5 Use a shared jest config
Add play.spec.ts as playwright test plaths. Also establishes .type.spec.ts as a specially ignored path everywhere.

Finally, we no longer need the ast transformer since we don't use import.meta statements anymore. (this was also two years ago, it's possible this just works now).
2025-10-07 11:44:30 -07:00

25 lines
750 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",
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)
".*.play.spec.ts", // ignore playwright tests
],
// Improves on-demand performance, for watches prefer 25%, overridable by setting --maxWorkers
maxWorkers: "50%",
};