mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-18 05:02:24 +08:00
FIX angular example tests (didn't I do this already?)
This commit is contained in:
parent
f8d07d38b0
commit
d5c4df1ff1
@ -1,5 +1,6 @@
|
||||
const base = require('./jest.config.js');
|
||||
|
||||
module.exports = {
|
||||
preset: 'jest-preset-angular',
|
||||
...base,
|
||||
testPathIgnorePatterns: ['/node_modules/', '/storybook-static/', 'angularshots.test.js', 'dist'],
|
||||
setupFilesAfterEnv: ['./jest-config/setup.ts'],
|
||||
};
|
||||
|
@ -1,20 +1,21 @@
|
||||
const path = require('path');
|
||||
const config = require('../../jest.config');
|
||||
|
||||
const projectDir = path.resolve('../../');
|
||||
|
||||
module.exports = {
|
||||
preset: 'jest-preset-angular',
|
||||
...config,
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
tsConfig: '<rootDir>/examples/angular-cli/src/tsconfig.spec.json',
|
||||
tsConfig: 'src/tsconfig.spec.json',
|
||||
stringifyContentPathRegex: '\\.html$',
|
||||
},
|
||||
},
|
||||
roots: [__dirname],
|
||||
transform: {
|
||||
'^.+\\.stories\\.[jt]sx?$': '@storybook/addon-storyshots/injectFileName',
|
||||
'^.+[/\\\\].storybook[/\\\\]config\\.ts$': '<rootDir>/scripts/utils/jest-transform-ts.js',
|
||||
'^.+\\.(ts|js|html)$': 'ts-jest',
|
||||
'^.+\\.jsx?$': '<rootDir>/scripts/utils/jest-transform-js.js',
|
||||
'^.+\\.(ts|html)$': 'ts-jest',
|
||||
'^.+\\.jsx?$': path.join(projectDir, 'scripts/utils/jest-transform-js.js'),
|
||||
'^.+\\.mdx$': '@storybook/addon-docs/jest-transform-mdx',
|
||||
},
|
||||
moduleFileExtensions: [...config.moduleFileExtensions, 'html'],
|
||||
@ -23,4 +24,5 @@ module.exports = {
|
||||
'jest-preset-angular/build/AngularSnapshotSerializer.js',
|
||||
'jest-preset-angular/build/HTMLCommentSerializer.js',
|
||||
],
|
||||
setupFilesAfterEnv: ['./jest-config/setup.ts'],
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user