Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test('should be a fail on login', () => {
const config: Config = new AppConfig(_.cloneDeep(authPluginFailureConf));
const auth: IAuth = new Auth(config);
expect(auth).toBeDefined();
const callback = jest.fn();
auth.authenticate('foo', 'bar', callback);
expect(callback).toHaveBeenCalledTimes(1);
expect(callback).toHaveBeenCalledWith(getInternalError());
});
});
changePassword(user: string, password: string, newPassword: string, cb: Callback) {
this.logger.trace(`[gitlab] changePassword called for user: ${user}`);
return cb(getInternalError('You are using verdaccio-gitlab integration. Please change your password in gitlab'));
}