2017-11-01 11:47:20 -05:00
|
|
|
/* eslint comma-dangle: 0 */
|
|
|
|
|
|
|
|
module.exports = {
|
2018-06-17 09:00:36 -05:00
|
|
|
name: 'verdaccio-unit-jest',
|
2018-02-19 13:29:14 -05:00
|
|
|
verbose: true,
|
|
|
|
collectCoverage: true,
|
|
|
|
testEnvironment: 'jest-environment-jsdom-global',
|
2018-06-30 05:44:03 -05:00
|
|
|
testURL: 'http://localhost',
|
2018-06-17 09:00:36 -05:00
|
|
|
testRegex: '(test/unit.*\\.spec|test/unit/webui/.*\\.spec)\\.js',
|
2018-02-19 13:29:14 -05:00
|
|
|
setupFiles: [
|
2018-06-17 09:10:09 -05:00
|
|
|
'./test/unit/setup.js'
|
2017-11-28 11:05:58 -05:00
|
|
|
],
|
2018-06-27 01:52:52 -05:00
|
|
|
// 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.
|
2018-02-19 13:29:14 -05:00
|
|
|
modulePathIgnorePatterns: [
|
2018-06-27 01:52:52 -05:00
|
|
|
'<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/',
|
2017-11-28 11:05:58 -05:00
|
|
|
],
|
2018-02-19 13:29:14 -05:00
|
|
|
testPathIgnorePatterns: [
|
2018-06-27 01:52:52 -05:00
|
|
|
'__snapshots__',
|
2018-06-27 14:19:48 -05:00
|
|
|
'<rootDir>/build',
|
2018-06-27 01:52:52 -05:00
|
|
|
],
|
|
|
|
coveragePathIgnorePatterns: [
|
|
|
|
'node_modules',
|
2018-06-27 14:19:48 -05:00
|
|
|
'fixtures',
|
|
|
|
'<rootDir>/test',
|
2017-12-02 09:01:06 -05:00
|
|
|
],
|
2018-02-19 13:29:14 -05:00
|
|
|
moduleNameMapper: {
|
2018-08-20 09:29:47 -05:00
|
|
|
'\\.(s?css)$': '<rootDir>/node_modules/identity-obj-proxy',
|
2017-12-01 14:04:01 -05:00
|
|
|
'github-markdown-css': '<rootDir>/node_modules/identity-obj-proxy',
|
2018-07-21 13:49:10 -05:00
|
|
|
'\\.(png)$': '<rootDir>/node_modules/identity-obj-proxy',
|
|
|
|
'\\.(svg)$': '<rootDir>/test/unit/empty.js'
|
2017-12-01 14:04:01 -05:00
|
|
|
},
|
2018-02-19 13:29:14 -05:00
|
|
|
transformIgnorePatterns: [
|
2017-12-01 14:04:01 -05:00
|
|
|
'<rootDir>/node_modules/(?!react-syntax-highlighter)'
|
|
|
|
]
|
2017-11-01 11:47:20 -05:00
|
|
|
};
|