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)