storybook/code/frameworks/angular/__vitest.config.ts
2023-09-14 15:13:18 +02:00

30 lines
926 B
TypeScript

module.exports = {
displayName: __dirname.split(sep).slice(-2).join(posix.sep),
preset: 'jest-preset-angular/presets/defaults-esm',
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
transformIgnorePatterns: ['/node_modules/(?!@angular|rxjs|nanoid|uuid)'],
snapshotFormat: {
escapeString: true,
printBasicPrototype: true,
},
coverageDirectory: './coverage/testapp',
transform: {
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
testMatch: [
'<rootDir>/src/**/__tests__/**/*.[jt]s?(x)',
'<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)',
],
};