2020-12-22 04:25:07 -05:00
|
|
|
const config = require('../../../../jest/config');
|
|
|
|
|
|
|
|
module.exports = Object.assign({}, config, {
|
|
|
|
name: 'verdaccio-ui-jest',
|
|
|
|
verbose: true,
|
|
|
|
automock: false,
|
|
|
|
collectCoverage: true,
|
|
|
|
testEnvironment: 'jest-environment-jsdom-global',
|
|
|
|
transform: {
|
|
|
|
'^.+\\.(js|ts|tsx)$': 'babel-jest',
|
|
|
|
},
|
|
|
|
moduleFileExtensions: ['js', 'ts', 'tsx'],
|
2021-09-25 10:35:03 -05:00
|
|
|
testURL: 'http://localhost:9000/',
|
2020-12-22 04:25:07 -05:00
|
|
|
rootDir: '..',
|
2021-09-25 10:35:03 -05:00
|
|
|
setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect', '<rootDir>/jest/setup-env.ts'],
|
2020-12-22 04:25:07 -05:00
|
|
|
setupFiles: ['<rootDir>/jest/setup.ts'],
|
|
|
|
transformIgnorePatterns: ['<rootDir>/node_modules/(?!react-syntax-highlighter)'],
|
|
|
|
modulePathIgnorePatterns: [
|
|
|
|
'<rootDir>/coverage',
|
|
|
|
'<rootDir>/scripts',
|
|
|
|
'<rootDir>/.circleci',
|
|
|
|
'<rootDir>/tools',
|
|
|
|
'<rootDir>/build',
|
|
|
|
'<rootDir>/.vscode/',
|
|
|
|
'<rootDir>/test/e2e/',
|
|
|
|
],
|
|
|
|
snapshotSerializers: ['@emotion/jest/serializer'],
|
|
|
|
moduleNameMapper: {
|
|
|
|
'\\.(s?css)$': '<rootDir>/jest/identity.js',
|
|
|
|
'\\.(png)$': '<rootDir>/jest/identity.js',
|
|
|
|
'\\.(svg)$': '<rootDir>/jest/unit/empty.ts',
|
|
|
|
'github-markdown-css': '<rootDir>/jest/identity.js',
|
|
|
|
// note: this section has to be on sync with webpack configuration
|
|
|
|
'verdaccio-ui/components/(.*)': '<rootDir>/src/components/$1',
|
|
|
|
'verdaccio-ui/utils/(.*)': '<rootDir>/src/utils/$1',
|
2021-04-15 14:10:28 -05:00
|
|
|
'verdaccio-ui/providers/(.*)': '<rootDir>/src/providers/$1',
|
2020-12-22 04:25:07 -05:00
|
|
|
'verdaccio-ui/design-tokens/(.*)': '<rootDir>/src/design-tokens/$1',
|
|
|
|
},
|
|
|
|
});
|