2023-05-22 20:19:16 +02:00
|
|
|
/* eslint-env node */
|
2025-01-14 11:23:59 -05:00
|
|
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
2025-06-02 19:13:31 +02:00
|
|
|
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"],
|
|
|
|
|
},
|
|
|
|
|
});
|
2023-05-22 20:19:16 +02:00
|
|
|
|
|
|
|
|
/** @type {import('jest').Config} */
|
|
|
|
|
module.exports = {
|
2025-06-02 19:13:31 +02:00
|
|
|
...presetConfig,
|
2023-05-22 20:19:16 +02:00
|
|
|
testMatch: ["**/+(*.)+(spec).+(ts)"],
|
|
|
|
|
|
2024-04-08 07:59:12 +10:00
|
|
|
testPathIgnorePatterns: [
|
|
|
|
|
"/node_modules/", // default value
|
|
|
|
|
".*.type.spec.ts", // ignore type tests (which are checked at compile time and not run by jest)
|
|
|
|
|
],
|
|
|
|
|
|
2024-06-04 10:40:41 -04:00
|
|
|
// Improves on-demand performance, for watches prefer 25%, overridable by setting --maxWorkers
|
|
|
|
|
maxWorkers: "50%",
|
2023-05-22 20:19:16 +02:00
|
|
|
};
|