0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-23 22:27:34 -05:00
verdaccio/test/functional/index.spec.js

73 lines
2.2 KiB
JavaScript
Raw Normal View History

// @flow
2017-12-02 05:19:08 -05:00
// we need this for notifications
import {setup} from '../../src/lib/logger';
setup();
import type {IServerBridge} from '../types';
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';
2018-06-23 09:34:22 -05:00
import distTagsMerge from './tags/dist-tags-merge';
import addtag from './tags/addtag';
2017-12-02 05:19:08 -05:00
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';
import gh29 from './scenarios/gh29';
2017-12-02 05:19:08 -05:00
import nullstorage from './sanity/nullstorage';
2018-06-23 09:34:22 -05:00
import simpleSearch from './search/simple.search';
2017-12-02 05:19:08 -05:00
import racycrash from './sanity/racycrash';
import security from './sanity/security';
import race from './performance/race';
import pluginsAuth from './plugins/auth';
import middleware from './plugins/middleware';
import upLinkCache from './uplinks/cache';
describe('functional test verdaccio', function() {
2018-01-28 03:35:33 -05:00
jest.setTimeout(10000);
const server1: IServerBridge = global.__SERVERS__[0];
const server2: IServerBridge = global.__SERVERS__[1];
const server3: IServerBridge = global.__SERVERS__[2];
const app = global.__WEB_SERVER__.app;
2017-12-03 16:23:06 -05:00
// list of test
// note: order of the following calls is important
packageAccess(server1);
gh29(server1, server2);
tags(server1, app);
packageGzip(server1, app);
incomplete(server1, app);
2017-12-03 16:23:06 -05:00
mirror(server1, server2);
2018-06-23 09:34:22 -05:00
distTagsMerge(server1, server2, server3);
2017-12-03 16:23:06 -05:00
readme(server1, server2);
nullstorage(server1, server2);
middleware(server2);
2017-12-03 16:23:06 -05:00
race(server1);
racycrash(server1, app);
2017-12-03 16:23:06 -05:00
packageScoped(server1, server2);
security(server1);
addtag(server1);
pluginsAuth(server2);
notify(app);
2017-12-02 05:19:08 -05:00
// requires packages published to server1/server2
2017-12-03 16:23:06 -05:00
upLinkCache(server1, server2, server3);
adduser(server1);
logout(server1);
basic(server1, server2);
2018-06-23 09:34:22 -05:00
simpleSearch(server1, server2, app)
2017-12-02 05:19:08 -05:00
});
2017-12-02 05:19:08 -05:00
process.on('unhandledRejection', function(err) {
2017-12-03 16:23:06 -05:00
console.error("unhandledRejection", err);
process.nextTick(function() {
throw err;
});
});