1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-13 03:35:52 +01:00
verdaccio/test/unit/api/mock.js
Juan Picado @jotadeveloper 712db31a43
feat: endpoints change password on ui (#1068)
* test: split up web and endpoints api

* chore: add reset password endpoint

not fully implemented yet

* feat: add password change api ednpoint for web
2018-11-18 18:41:05 +01:00

19 lines
755 B
JavaScript

// @flow
import path from 'path';
import {DOMAIN_SERVERS} from '../../functional/config.functional';
import VerdaccioProcess from '../../lib/server_process';
import {VerdaccioConfig} from '../../lib/verdaccio-server';
import Server from '../../lib/server';
import type {IServerBridge} from '../../types';
export function mockServer(port: number) {
const pathStore = path.join(__dirname, '../partials');
const verdaccioConfig = new VerdaccioConfig(
path.join(pathStore, '/mock-store'),
path.join(pathStore, '/config-unit-mock-server-test.yaml'), `http://${DOMAIN_SERVERS}:${port}/`, port);
const server: IServerBridge = new Server(verdaccioConfig.domainPath);
return new VerdaccioProcess(verdaccioConfig, server, false, false, false);
}