2018-02-24 07:59:36 +01:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import Auth from '../../src/lib/auth';
|
|
|
|
jest.mock('../../src/lib/auth');
|
|
|
|
// $FlowFixMe
|
|
|
|
import configExample from './partials/config';
|
|
|
|
import AppConfig from '../../src/lib/config';
|
|
|
|
import {setup} from '../../src/lib/logger';
|
|
|
|
|
2018-02-26 21:28:09 +01:00
|
|
|
import type {IAuth} from '../../types';
|
|
|
|
import type {Config} from '@verdaccio/types';
|
2018-02-24 07:59:36 +01:00
|
|
|
|
|
|
|
setup(configExample.logs);
|
|
|
|
|
|
|
|
describe('AuthTest', () => {
|
|
|
|
|
|
|
|
test('should be defined', () => {
|
|
|
|
const config: Config = new AppConfig(configExample);
|
|
|
|
const auth: IAuth = new Auth(config);
|
|
|
|
|
|
|
|
expect(auth).toBeDefined();
|
|
|
|
expect(Auth).toHaveBeenCalledTimes(1);
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|