0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-03-18 02:22:46 -05:00

Update index.spec.ts

This commit is contained in:
Juan Picado 2025-03-16 11:15:45 +01:00
parent 6ade2de358
commit 1b6115f2d6

View file

@ -1,7 +1,7 @@
import { beforeEach, describe, expect, test, vi } from 'vitest';
import { Config, getDefaultConfig } from '@verdaccio/config';
import { pluginUtils } from '@verdaccio/core';
import { API_ERROR, errorUtils, pluginUtils } from '@verdaccio/core';
import Memory from '../src/index';
import { Users, VerdaccioMemoryConfig } from '../src/types';
@ -307,8 +307,8 @@ describe('Memory', function () {
test('fails if user does not exist', function () {
return new Promise((done) => {
auth.authenticate('john', 'secret', function (err, groups) {
expect(err).toBeNull();
expect(groups).toBeFalsy();
expect(err).toEqual(errorUtils.getUnauthorized(API_ERROR.BAD_USERNAME_PASSWORD));
expect(groups).toBeUndefined();
done(true);
});
});