2020-12-22 04:25:07 -05:00
|
|
|
const config = require('../../../../jest/config');
|
|
|
|
|
|
|
|
module.exports = Object.assign({}, config, {
|
|
|
|
automock: false,
|
2022-02-26 16:39:13 -05:00
|
|
|
collectCoverage: false,
|
2020-12-22 04:25:07 -05:00
|
|
|
testEnvironment: 'jest-environment-jsdom-global',
|
|
|
|
transform: {
|
|
|
|
'^.+\\.(js|ts|tsx)$': 'babel-jest',
|
|
|
|
},
|
|
|
|
moduleFileExtensions: ['js', 'ts', 'tsx'],
|
2022-10-15 07:03:51 -05:00
|
|
|
testEnvironmentOptions: {
|
|
|
|
url: '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',
|
2022-03-12 16:42:05 -05:00
|
|
|
'\\.(jpg)$': '<rootDir>/jest/unit/empty.ts',
|
2022-04-16 05:26:02 -05:00
|
|
|
'\\.(md)$': '<rootDir>/jest/unit/empty-string.ts',
|
2020-12-22 04:25:07 -05:00
|
|
|
'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',
|
2022-01-22 07:54:00 -05:00
|
|
|
'react-markdown': '<rootDir>/src/__mocks__/react-markdown.tsx',
|
|
|
|
'remark-*': '<rootDir>/src/__mocks__/remark-plugin.ts',
|
2020-12-22 04:25:07 -05:00
|
|
|
},
|
|
|
|
});
|