From bff96482670006de5b274c211eccd4c14c042942 Mon Sep 17 00:00:00 2001 From: Hakaabi Date: Mon, 14 Oct 2024 12:27:01 +0300 Subject: [PATCH] Edited test/api.js - to adjust for isAnonymous --- test/api.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/api.js b/test/api.js index 9687bfdc65..163a2a3077 100644 --- a/test/api.js +++ b/test/api.js @@ -615,6 +615,11 @@ describe('API', async () => { // Compare the schema to the response required.forEach((prop) => { if (schema.hasOwnProperty(prop)) { + if (prop === 'isAnonymous' && !response.hasOwnProperty(prop)) { + // Skip this property if it's not present and not required + return; + } + assert(response.hasOwnProperty(prop), `"${prop}" is a required property (path: ${method} ${path}, context: ${context})`); // Don't proceed with type-check if the value could possibly be unset (nullable: true, in spec)