2019-04-05 02:23:40 +07:00
|
|
|
/* eslint comma-dangle: 0 */
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
name: 'verdaccio-unit-jest',
|
|
|
|
verbose: true,
|
|
|
|
collectCoverage: true,
|
|
|
|
testEnvironment: 'jest-environment-jsdom-global',
|
|
|
|
testURL: 'http://localhost',
|
2019-05-02 02:02:46 +07:00
|
|
|
testRegex: '(test/unit/.*\\.spec)\\.js',
|
2019-04-05 02:23:40 +07:00
|
|
|
setupFiles: [
|
|
|
|
'./test/unit/setup.js'
|
|
|
|
],
|
|
|
|
// Some unit tests rely on data folders that look like packages. This confuses jest-hast-map
|
|
|
|
// when it tries to scan for package.json files.
|
|
|
|
modulePathIgnorePatterns: [
|
|
|
|
'<rootDir>/test/unit/partials/mock-store/.*/package.json',
|
|
|
|
'<rootDir>/test/functional/store/.*/package.json',
|
|
|
|
'<rootDir>/test/unit/partials/store/.*/package.json',
|
|
|
|
'<rootDir>/coverage',
|
|
|
|
'<rootDir>/docs',
|
|
|
|
'<rootDir>/debug',
|
|
|
|
'<rootDir>/scripts',
|
|
|
|
'<rootDir>/.circleci',
|
|
|
|
'<rootDir>/tools',
|
|
|
|
'<rootDir>/wiki',
|
|
|
|
'<rootDir>/systemd',
|
|
|
|
'<rootDir>/flow-typed',
|
|
|
|
'<rootDir>test/unit/partials/mock-store/.*/package.json',
|
|
|
|
'<rootDir>/test/functional/store/.*/package.json',
|
|
|
|
'<rootDir>/build',
|
|
|
|
'<rootDir>/.vscode/',
|
|
|
|
],
|
|
|
|
testPathIgnorePatterns: [
|
|
|
|
'__snapshots__',
|
|
|
|
'<rootDir>/build',
|
|
|
|
],
|
2019-04-05 04:01:15 +07:00
|
|
|
snapshotSerializers: [
|
2019-05-02 02:02:46 +07:00
|
|
|
'enzyme-to-json/serializer',
|
2019-04-05 04:01:15 +07:00
|
|
|
"jest-emotion"
|
|
|
|
],
|
2019-04-05 02:23:40 +07:00
|
|
|
coveragePathIgnorePatterns: [
|
|
|
|
'node_modules',
|
|
|
|
'fixtures',
|
|
|
|
'<rootDir>/src/api/debug',
|
|
|
|
'<rootDir>/test',
|
|
|
|
],
|
|
|
|
moduleNameMapper: {
|
|
|
|
'\\.(s?css)$': '<rootDir>/node_modules/identity-obj-proxy',
|
|
|
|
'github-markdown-css': '<rootDir>/node_modules/identity-obj-proxy',
|
|
|
|
'\\.(png)$': '<rootDir>/node_modules/identity-obj-proxy',
|
|
|
|
'\\.(svg)$': '<rootDir>/test/unit/empty.js'
|
|
|
|
},
|
|
|
|
transformIgnorePatterns: [
|
|
|
|
'<rootDir>/node_modules/(?!react-syntax-highlighter)'
|
|
|
|
]
|
|
|
|
};
|