0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-23 22:27:34 -05:00
verdaccio/test/unit/modules/bootstrap/legacy.spec.ts
Juan Picado 42194c7302
feat: run server init as promise (#3210)
* feat: run server init as promise

* chore: format

* fix: format

* fix: format

* fix: restore files

* fix: restore files

* fix: disable steps

* fix: init log on cli

* fix: init log on cli

* fix: init log on cli

* fix: init log on cli

* fix: init log on cli

* fix: init log on cli

* fix: init log on cli

* fix: init log on cli

* fix: init log on cli

* fix: init log on cli

* fix: init log on cli
2022-06-02 17:39:49 +02:00

28 lines
952 B
TypeScript

import { join } from 'path';
import startVerdaccioDeault, { startVerdaccio } from '../../../../src';
import { parseConfigFile } from '../../../../src/lib/utils';
describe('bootstrap legacy', () => {
describe('startVerdaccio', () => {
test('run server should be able to listen', (done) => {
const p = join(__dirname, './config.yaml');
const cache = join(__dirname, 'cache');
const config = parseConfigFile(p);
startVerdaccio(config, '5000', cache, '1.0.0', 'verdaccio', (server, addr) => {
server.close();
done();
});
});
test('run server should be able to listen default method', (done) => {
const p = join(__dirname, './config.yaml');
const cache = join(__dirname, 'cache');
const config = parseConfigFile(p);
startVerdaccioDeault(config, '5000', cache, '1.0.0', 'verdaccio', (server, addr) => {
server.close();
done();
});
});
});
});