1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-13 03:35:52 +01:00
verdaccio/jest.config.js
Ayush Sharma 9cd3ccb408 fix: login without reload (#678) (#679) (#914)
* fix: login without reload (#678) (#679)

* fix: implements code review suggestions (#914)

* refactor: adds scope to the app

* refactor: handles null value from localstorage for username

* refactor: removes text type from <Input />

* refactor: replaces isNull with isNil

* refactor: improves makeLogin method

* refactor: adds error from api constant

* fix: updates error using API_ERROR constant in tests

* refactor: updates regex for moduleMapper in jest config
2018-08-20 16:29:47 +02:00

52 lines
1.6 KiB
JavaScript

/* eslint comma-dangle: 0 */
module.exports = {
name: 'verdaccio-unit-jest',
verbose: true,
collectCoverage: true,
testEnvironment: 'jest-environment-jsdom-global',
testURL: 'http://localhost',
testRegex: '(test/unit.*\\.spec|test/unit/webui/.*\\.spec)\\.js',
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',
],
coveragePathIgnorePatterns: [
'node_modules',
'fixtures',
'<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)'
]
};