From 4ec538fc3c35cfda9438f4d8761a9b1724a03bb2 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sat, 30 Jan 2021 07:36:34 +0000 Subject: [PATCH 1/2] Update tests/backend/specs/api/api.js Co-authored-by: Richard Hansen --- tests/backend/specs/api/api.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/backend/specs/api/api.js b/tests/backend/specs/api/api.js index 1580b3388..98f4fc698 100644 --- a/tests/backend/specs/api/api.js +++ b/tests/backend/specs/api/api.js @@ -12,8 +12,7 @@ const supertest = require(`${__dirname}/../../../../src/node_modules/supertest`) const settings = require(`${__dirname}/../../../../src/node/utils/Settings`); const api = supertest(`http://${settings.ip}:${settings.port}`); -const validateOpenAPI = - require(`${__dirname}/../../../../src/node_modules/openapi-schema-validation`).validate; +const validateOpenAPI = require('ep_etherpad-lite/node_modules/openapi-schema-validation').validate; const apiKey = common.apiKey; let apiVersion = 1; From b2f3828f5ad6445d2c667abb3d94f919412a29b0 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sat, 30 Jan 2021 07:37:39 +0000 Subject: [PATCH 2/2] Update tests/backend/specs/api/api.js Co-authored-by: Richard Hansen --- tests/backend/specs/api/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/backend/specs/api/api.js b/tests/backend/specs/api/api.js index 98f4fc698..1b857ec02 100644 --- a/tests/backend/specs/api/api.js +++ b/tests/backend/specs/api/api.js @@ -43,8 +43,8 @@ describe(__filename, function () { const {valid, errors} = validateOpenAPI(res.body, 3); if (!valid) { const prettyErrors = JSON.stringify(errors, null, 2); - throw new Error(`Document is not valid OpenAPI. - ${errors.length} validation errors:\n${prettyErrors}`); + throw new Error('Document is not valid OpenAPI. ' + + `${errors.length} validation errors:\n${prettyErrors}`); } return; })