tests: Delete unnecessary `describe()` calls in `api.js`

pull/4770/head
Richard Hansen 2021-02-12 18:51:42 -05:00 committed by John McLear
parent fc9b22475a
commit 08124ba733
1 changed files with 30 additions and 36 deletions

View File

@ -32,8 +32,7 @@ const testPadId = makeid();
const endPoint = (point) => `/api/${apiVersion}/${point}?apikey=${apiKey}`;
describe(__filename, function () {
describe('API Versioning', function () {
it('errors if can not connect', function (done) {
it('can obtain API version', function (done) {
api
.get('/api/')
.expect((res) => {
@ -43,10 +42,8 @@ describe(__filename, function () {
})
.expect(200, done);
});
});
describe('OpenAPI definition', function () {
it('generates valid openapi definition document', function (done) {
it('can obtain valid openapi definition document', function (done) {
api
.get('/api/openapi.json')
.expect((res) => {
@ -60,9 +57,7 @@ describe(__filename, function () {
})
.expect(200, done);
});
});
describe('jsonp support', function () {
it('supports jsonp calls', function (done) {
api
.get(`${endPoint('createPad')}&jsonp=jsonp_1&padID=${testPadId}`)
@ -72,5 +67,4 @@ describe(__filename, function () {
.expect('Content-Type', /javascript/)
.expect(200, done);
});
});
});