2020-06-30 14:55:14 -05:00
|
|
|
import supertest from 'supertest';
|
|
|
|
|
|
|
|
import { HTTP_STATUS } from '@verdaccio/commons-api';
|
2020-08-13 16:27:00 -05:00
|
|
|
import { HEADER_TYPE, HEADERS } from '@verdaccio/dev-commons';
|
|
|
|
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 () => {
|
|
|
|
return supertest(await initializeServer('ping.yaml'))
|
|
|
|
.get('/-/ping')
|
|
|
|
.set('Accept', HEADERS.JSON)
|
|
|
|
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
|
|
|
|
.expect(HTTP_STATUS.OK)
|
|
|
|
.then((response) => expect(response.body).toEqual({}));
|
|
|
|
});
|
2020-06-30 14:55:14 -05:00
|
|
|
});
|