mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
Merge branch 'mochawesome' of github.com:ether/etherpad-lite into mochawesome
This commit is contained in:
commit
28af41e906
1 changed files with 3 additions and 4 deletions
|
@ -12,8 +12,7 @@ const supertest = require(`${__dirname}/../../../../src/node_modules/supertest`)
|
||||||
const settings = require(`${__dirname}/../../../../src/node/utils/Settings`);
|
const settings = require(`${__dirname}/../../../../src/node/utils/Settings`);
|
||||||
const api = supertest(`http://${settings.ip}:${settings.port}`);
|
const api = supertest(`http://${settings.ip}:${settings.port}`);
|
||||||
|
|
||||||
const validateOpenAPI =
|
const validateOpenAPI = require('ep_etherpad-lite/node_modules/openapi-schema-validation').validate;
|
||||||
require(`${__dirname}/../../../../src/node_modules/openapi-schema-validation`).validate;
|
|
||||||
|
|
||||||
const apiKey = common.apiKey;
|
const apiKey = common.apiKey;
|
||||||
let apiVersion = 1;
|
let apiVersion = 1;
|
||||||
|
@ -44,8 +43,8 @@ describe(__filename, function () {
|
||||||
const {valid, errors} = validateOpenAPI(res.body, 3);
|
const {valid, errors} = validateOpenAPI(res.body, 3);
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
const prettyErrors = JSON.stringify(errors, null, 2);
|
const prettyErrors = JSON.stringify(errors, null, 2);
|
||||||
throw new Error(`Document is not valid OpenAPI.
|
throw new Error('Document is not valid OpenAPI. ' +
|
||||||
${errors.length} validation errors:\n${prettyErrors}`);
|
`${errors.length} validation errors:\n${prettyErrors}`);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue