mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-21 07:29:37 +01:00
refactor: functional testing relocation
functional testing runs in a different process
This commit is contained in:
parent
49c6191bb5
commit
b28e6f737b
51
.npmignore
51
.npmignore
@ -1,30 +1,45 @@
|
|||||||
node_modules
|
|
||||||
|
## npm
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
renovate.json
|
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
|
node_modules
|
||||||
|
verdaccio-*.tgz
|
||||||
|
|
||||||
|
renovate.json
|
||||||
docker-compose.yaml
|
docker-compose.yaml
|
||||||
Dockerfile.rpi
|
Dockerfile.rpi
|
||||||
Dockerfile
|
Dockerfile
|
||||||
circle.yml
|
|
||||||
crowdin.yaml
|
crowdin.yaml
|
||||||
coverage/
|
|
||||||
verdaccio-*.tgz
|
|
||||||
test-storage*
|
|
||||||
scripts/
|
scripts/
|
||||||
docs/
|
|
||||||
src/
|
src/
|
||||||
tools/
|
|
||||||
/.*
|
/.*
|
||||||
.vscode/
|
.vscode/
|
||||||
website/
|
.circleci/
|
||||||
assets/
|
|
||||||
flow-typed/
|
|
||||||
__mocks__/
|
|
||||||
test/
|
|
||||||
types/
|
|
||||||
wiki/
|
|
||||||
jestEnvironment.js
|
|
||||||
test/e2e/jest.e2e.config.js
|
|
||||||
jest.config.js
|
|
||||||
debug/
|
debug/
|
||||||
|
|
||||||
|
# build ui
|
||||||
|
tools/
|
||||||
|
|
||||||
|
## assets and website
|
||||||
|
assets/
|
||||||
|
website/
|
||||||
|
|
||||||
|
## docs
|
||||||
|
docs/
|
||||||
|
wiki/
|
||||||
|
|
||||||
|
## flow
|
||||||
|
flow-typed/
|
||||||
|
types/
|
||||||
|
|
||||||
|
# jest
|
||||||
|
coverage/
|
||||||
|
test-storage*
|
||||||
|
test/
|
||||||
|
__mocks__/
|
||||||
|
jestEnvironment.js
|
||||||
|
test/e2e/jest.e2e.config.js
|
||||||
|
test/jest.config.func.js
|
||||||
|
jest.config.unit.js
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* eslint comma-dangle: 0 */
|
/* eslint comma-dangle: 0 */
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'verdaccio-jest',
|
name: 'verdaccio-unit-jest',
|
||||||
verbose: true,
|
verbose: true,
|
||||||
collectCoverage: true,
|
collectCoverage: true,
|
||||||
coveragePathIgnorePatterns: [
|
coveragePathIgnorePatterns: [
|
||||||
@ -9,7 +9,7 @@ module.exports = {
|
|||||||
'fixtures'
|
'fixtures'
|
||||||
],
|
],
|
||||||
testEnvironment: 'jest-environment-jsdom-global',
|
testEnvironment: 'jest-environment-jsdom-global',
|
||||||
testRegex: '(/test/unit.*\\.spec|test/functional.*\\.func|/test/unit/webui/.*\\.spec)\\.js',
|
testRegex: '(test/unit.*\\.spec|test/unit/webui/.*\\.spec)\\.js',
|
||||||
setupFiles: [
|
setupFiles: [
|
||||||
'./test/unit/setup-webui.js'
|
'./test/unit/setup-webui.js'
|
||||||
],
|
],
|
@ -154,9 +154,9 @@
|
|||||||
"prepublish": "in-publish && npm run build:webui && npm run code:build || not-in-publish",
|
"prepublish": "in-publish && npm run build:webui && npm run code:build || not-in-publish",
|
||||||
"flow": "flow",
|
"flow": "flow",
|
||||||
"pretest": "npm run code:build",
|
"pretest": "npm run code:build",
|
||||||
"test": "cross-env NODE_ENV=test BABEL_ENV=test TZ=UTC jest --maxWorkers 2",
|
"test": "cross-env npm run test:unit && npm run test:func",
|
||||||
"test:unit": "cross-env NODE_ENV=test BABEL_ENV=test TZ=UTC jest '(/test/unit.*\\.spec|/test/webui/.*\\.spec)\\.js' --maxWorkers 2",
|
"test:unit": "cross-env NODE_ENV=test BABEL_ENV=test TZ=UTC jest --config ./jest.config.unit.js --maxWorkers 2",
|
||||||
"test:func": "cross-env NODE_ENV=test BABEL_ENV=test jest '(/test/functional.*\\.func)\\.js' --maxWorkers 2",
|
"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/e2e/jest.e2e.config.js --maxWorkers 2",
|
||||||
"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",
|
||||||
|
@ -12,27 +12,27 @@ import ExpressServer from './lib/simple_server';
|
|||||||
import Server from '../lib/server';
|
import Server from '../lib/server';
|
||||||
import type {IServerProcess, IServerBridge} from '../types';
|
import type {IServerProcess, IServerBridge} from '../types';
|
||||||
|
|
||||||
import basic from './basic/basic.spec';
|
import basic from './basic/basic';
|
||||||
import packageAccess from './package/access.spec';
|
import packageAccess from './package/access';
|
||||||
import packageGzip from './package/gzip.spec';
|
import packageGzip from './package/gzip';
|
||||||
import packageScoped from './package/scoped.spec';
|
import packageScoped from './package/scoped';
|
||||||
import tags from './tags/tags.spec';
|
import tags from './tags/tags';
|
||||||
import preserveTags from './tags/preserve_tags.spec';
|
import preserveTags from './tags/preserve_tags';
|
||||||
import addtag from './tags/addtag.spec';
|
import addtag from './tags/addtag';
|
||||||
import adduser from './adduser/adduser';
|
import adduser from './adduser/adduser';
|
||||||
import logout from './adduser/logout';
|
import logout from './adduser/logout';
|
||||||
import notify from './notifications/notify';
|
import notify from './notifications/notify';
|
||||||
import incomplete from './sanity/incomplete';
|
import incomplete from './sanity/incomplete';
|
||||||
import mirror from './sanity/mirror';
|
import mirror from './sanity/mirror';
|
||||||
import readme from './readme/readme.spec';
|
import readme from './readme/readme';
|
||||||
import gh29 from './gh29';
|
import gh29 from './gh29';
|
||||||
import nullstorage from './sanity/nullstorage';
|
import nullstorage from './sanity/nullstorage';
|
||||||
import racycrash from './sanity/racycrash';
|
import racycrash from './sanity/racycrash';
|
||||||
import security from './sanity/security';
|
import security from './sanity/security';
|
||||||
import race from './performance/race';
|
import race from './performance/race';
|
||||||
import pluginsAuth from './plugins/auth.spec';
|
import pluginsAuth from './plugins/auth';
|
||||||
import upLinkCache from './uplink.cache.spec';
|
import upLinkCache from './uplink.cache';
|
||||||
import upLinkAuth from './uplink.auth.spec';
|
import upLinkAuth from './uplink.auth';
|
||||||
|
|
||||||
describe('functional test verdaccio', function() {
|
describe('functional test verdaccio', function() {
|
||||||
jest.setTimeout(10000);
|
jest.setTimeout(10000);
|
8
test/jest.config.func.js
Normal file
8
test/jest.config.func.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/* eslint comma-dangle: 0 */
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'verdaccio-func-jest',
|
||||||
|
verbose: true,
|
||||||
|
collectCoverage: false,
|
||||||
|
testPathPattern: 'test/functional/functional.spec.js'
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user