mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
refactor: functional testing relocation
functional testing runs in a different process
This commit is contained in:
parent
49c6191bb5
commit
b28e6f737b
17 changed files with 57 additions and 34 deletions
51
.npmignore
51
.npmignore
|
@ -1,30 +1,45 @@
|
|||
node_modules
|
||||
|
||||
## npm
|
||||
npm-debug.log
|
||||
renovate.json
|
||||
yarn-error.log
|
||||
node_modules
|
||||
verdaccio-*.tgz
|
||||
|
||||
renovate.json
|
||||
docker-compose.yaml
|
||||
Dockerfile.rpi
|
||||
Dockerfile
|
||||
circle.yml
|
||||
crowdin.yaml
|
||||
coverage/
|
||||
verdaccio-*.tgz
|
||||
test-storage*
|
||||
scripts/
|
||||
docs/
|
||||
src/
|
||||
tools/
|
||||
/.*
|
||||
.vscode/
|
||||
website/
|
||||
assets/
|
||||
flow-typed/
|
||||
__mocks__/
|
||||
test/
|
||||
types/
|
||||
wiki/
|
||||
jestEnvironment.js
|
||||
test/e2e/jest.e2e.config.js
|
||||
jest.config.js
|
||||
.circleci/
|
||||
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 */
|
||||
|
||||
module.exports = {
|
||||
name: 'verdaccio-jest',
|
||||
name: 'verdaccio-unit-jest',
|
||||
verbose: true,
|
||||
collectCoverage: true,
|
||||
coveragePathIgnorePatterns: [
|
||||
|
@ -9,7 +9,7 @@ module.exports = {
|
|||
'fixtures'
|
||||
],
|
||||
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: [
|
||||
'./test/unit/setup-webui.js'
|
||||
],
|
|
@ -154,9 +154,9 @@
|
|||
"prepublish": "in-publish && npm run build:webui && npm run code:build || not-in-publish",
|
||||
"flow": "flow",
|
||||
"pretest": "npm run code:build",
|
||||
"test": "cross-env NODE_ENV=test BABEL_ENV=test TZ=UTC jest --maxWorkers 2",
|
||||
"test:unit": "cross-env NODE_ENV=test BABEL_ENV=test TZ=UTC jest '(/test/unit.*\\.spec|/test/webui/.*\\.spec)\\.js' --maxWorkers 2",
|
||||
"test:func": "cross-env NODE_ENV=test BABEL_ENV=test jest '(/test/functional.*\\.func)\\.js' --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 --config ./jest.config.unit.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:all": "npm run test && npm run test:e2e",
|
||||
"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 type {IServerProcess, IServerBridge} from '../types';
|
||||
|
||||
import basic from './basic/basic.spec';
|
||||
import packageAccess from './package/access.spec';
|
||||
import packageGzip from './package/gzip.spec';
|
||||
import packageScoped from './package/scoped.spec';
|
||||
import tags from './tags/tags.spec';
|
||||
import preserveTags from './tags/preserve_tags.spec';
|
||||
import addtag from './tags/addtag.spec';
|
||||
import basic from './basic/basic';
|
||||
import packageAccess from './package/access';
|
||||
import packageGzip from './package/gzip';
|
||||
import packageScoped from './package/scoped';
|
||||
import tags from './tags/tags';
|
||||
import preserveTags from './tags/preserve_tags';
|
||||
import addtag from './tags/addtag';
|
||||
import adduser from './adduser/adduser';
|
||||
import logout from './adduser/logout';
|
||||
import notify from './notifications/notify';
|
||||
import incomplete from './sanity/incomplete';
|
||||
import mirror from './sanity/mirror';
|
||||
import readme from './readme/readme.spec';
|
||||
import readme from './readme/readme';
|
||||
import gh29 from './gh29';
|
||||
import nullstorage from './sanity/nullstorage';
|
||||
import racycrash from './sanity/racycrash';
|
||||
import security from './sanity/security';
|
||||
import race from './performance/race';
|
||||
import pluginsAuth from './plugins/auth.spec';
|
||||
import upLinkCache from './uplink.cache.spec';
|
||||
import upLinkAuth from './uplink.auth.spec';
|
||||
import pluginsAuth from './plugins/auth';
|
||||
import upLinkCache from './uplink.cache';
|
||||
import upLinkAuth from './uplink.auth';
|
||||
|
||||
describe('functional test verdaccio', function() {
|
||||
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 a new issue