2020-06-30 14:55:14 -05:00
|
|
|
import supertest from 'supertest';
|
|
|
|
|
2021-10-29 10:33:05 -05:00
|
|
|
import { HEADERS, HEADER_TYPE, HTTP_STATUS } from '@verdaccio/core';
|
|
|
|
|
2020-08-13 16:27:00 -05:00
|
|
|
import { initializeServer } from './_helper';
|
2020-06-30 14:55:14 -05:00
|
|
|
|
|
|
|
describe('ping', () => {
|
2020-08-13 16:27:00 -05:00
|
|
|
test('should return the reply the ping', async () => {
|
2022-07-29 13:51:45 -05:00
|
|
|
const app = await initializeServer('ping.yaml');
|
|
|
|
const response = await supertest(app)
|
2020-08-13 16:27:00 -05:00
|
|
|
.get('/-/ping')
|
|
|
|
.set('Accept', HEADERS.JSON)
|
|
|
|
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
2022-07-29 13:51:45 -05:00
|
|
|
.expect(HTTP_STATUS.OK);
|
|
|
|
expect(response.body).toEqual({});
|
2020-08-13 16:27:00 -05:00
|
|
|
});
|
2020-06-30 14:55:14 -05:00
|
|
|
});
|