mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-02 05:03:44 +08:00
32 lines
952 B
JavaScript
32 lines
952 B
JavaScript
const path = require('path');
|
|
|
|
module.exports = {
|
|
displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep),
|
|
preset: 'jest-preset-angular',
|
|
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
|
|
transformIgnorePatterns: ['/node_modules/(?!@angular|rxjs|nanoid|uuid)'],
|
|
snapshotFormat: {
|
|
escapeString: true,
|
|
printBasicPrototype: true,
|
|
},
|
|
globals: {
|
|
'ts-jest': {
|
|
tsconfig: '<rootDir>/tsconfig.spec.json',
|
|
stringifyContentPathRegex: '\\.(html|svg)$',
|
|
},
|
|
},
|
|
coverageDirectory: './coverage/testapp',
|
|
transform: {
|
|
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
|
|
},
|
|
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)',
|
|
],
|
|
};
|