Skip to content

Commit

Permalink
Edited test/api.js - to adjust for isAnonymous
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakaabi committed Oct 14, 2024
1 parent e291c08 commit bff9648
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Check failure on line 622 in test/api.js

View workflow job for this annotation

GitHub Actions / test

Trailing spaces not allowed
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)
Expand Down

0 comments on commit bff9648

Please sign in to comment.