0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-03-11 02:15:57 -05:00

refactor: jest config files relocation

still pending unit config file
This commit is contained in:
Juan Picado @jotadeveloper 2018-06-17 16:10:09 +02:00
parent b28e6f737b
commit b113aa3a55
No known key found for this signature in database
GPG key ID: 18AC54485952D158
6 changed files with 9 additions and 10 deletions

View file

@ -38,7 +38,7 @@ test-storage*
test/ test/
__mocks__/ __mocks__/
jestEnvironment.js jestEnvironment.js
test/e2e/jest.e2e.config.js test/jest.e2e.config.js
test/jest.config.func.js test/jest.config.func.js
jest.config.unit.js jest.config.unit.js

View file

@ -11,10 +11,10 @@ module.exports = {
testEnvironment: 'jest-environment-jsdom-global', testEnvironment: 'jest-environment-jsdom-global',
testRegex: '(test/unit.*\\.spec|test/unit/webui/.*\\.spec)\\.js', testRegex: '(test/unit.*\\.spec|test/unit/webui/.*\\.spec)\\.js',
setupFiles: [ setupFiles: [
'./test/unit/setup-webui.js' './test/unit/setup.js'
], ],
modulePathIgnorePatterns: [ modulePathIgnorePatterns: [
'setup-webui.js' 'setup.js'
], ],
testPathIgnorePatterns: [ testPathIgnorePatterns: [
'__snapshots__' '__snapshots__'

View file

@ -155,9 +155,9 @@
"flow": "flow", "flow": "flow",
"pretest": "npm run code:build", "pretest": "npm run code:build",
"test": "cross-env npm run test:unit && npm run test:func", "test": "cross-env npm run test:unit && npm run test:func",
"test:unit": "cross-env NODE_ENV=test BABEL_ENV=test TZ=UTC jest --config ./jest.config.unit.js --maxWorkers 2", "test:unit": "cross-env NODE_ENV=test BABEL_ENV=test TZ=UTC jest --config ./jest.config.unit.js",
"test:func": "cross-env NODE_ENV=test BABEL_ENV=test jest --config ./test/jest.config.func.js --testPathPattern ./test/functional/index*", "test:func": "cross-env NODE_ENV=test BABEL_ENV=test jest --config ./test/jest.config.func.js --testPathPattern ./test/functional/index*",
"test:e2e": "cross-env BABEL_ENV=testE2E jest --config ./test/e2e/jest.e2e.config.js --maxWorkers 2", "test:e2e": "cross-env BABEL_ENV=testE2E jest --config ./test/jest.config.e2e.js",
"test:all": "npm run test && npm run test:e2e", "test:all": "npm run test && npm run test:e2e",
"pre:ci": "npm run lint && npm run build:webui", "pre:ci": "npm run lint && npm run build:webui",
"commitmsg": "commitlint -e $GIT_PARAMS", "commitmsg": "commitlint -e $GIT_PARAMS",

View file

@ -4,8 +4,8 @@ module.exports = {
name: 'verdaccio-e2e-jest', name: 'verdaccio-e2e-jest',
verbose: true, verbose: true,
collectCoverage: false, collectCoverage: false,
globalSetup: './pre-setup.js', globalSetup: './e2e/pre-setup.js',
globalTeardown: './teardown.js', globalTeardown: './e2e/teardown.js',
testEnvironment: './puppeteer_environment.js', testEnvironment: './e2e/puppeteer_environment.js',
testRegex: '(/e2e.*\\.spec)\\.js' testRegex: '(/e2e.*\\.spec)\\.js'
}; };

View file

@ -3,6 +3,5 @@
module.exports = { module.exports = {
name: 'verdaccio-func-jest', name: 'verdaccio-func-jest',
verbose: true, verbose: true,
collectCoverage: false, collectCoverage: false
testPathPattern: 'test/functional/functional.spec.js'
}; };