0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-06 22:40:26 -05:00

test(unit): fix test for disabling web login (#3848)

This commit is contained in:
George Kalpakas 2023-05-31 18:58:58 +03:00 committed by GitHub
parent 59a6c01124
commit c3b0247019
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -70,6 +70,7 @@ export const HTTP_STATUS = {
INTERNAL_ERROR: httpCodes.INTERNAL_SERVER_ERROR,
SERVICE_UNAVAILABLE: httpCodes.SERVICE_UNAVAILABLE,
LOOP_DETECTED: 508,
CANNOT_HANDLE: 590,
};
export const ERROR_CODE = {

View file

@ -65,7 +65,7 @@ describe('test web server', () => {
});
});
test.skip('log in should be disabled', async () => {
test('log in should be disabled', async () => {
return supertest(await initializeServer('login-disabled.yaml'))
.post('/-/verdaccio/sec/login')
.send(
@ -75,7 +75,8 @@ describe('test web server', () => {
})
)
.set(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON)
.expect(HTTP_STATUS.NOT_FOUND);
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
.expect(HTTP_STATUS.CANNOT_HANDLE, JSON.stringify({ error: 'cannot handle this' }));
});
test.todo('should change password');