Commit a94cb40
committed
Fix "does not have field" assertion to accept undefined (#3922)
ObjectSerializer.deserialize() always assigns `instance[attr] = undefined`
for optional fields absent from the JSON response, so the property key
exists on the object even when the field was not present. Chai's
`.not.have.property()` uses hasOwnProperty() which returns true for
undefined-valued keys, causing the assertion to fail.
Treat a property value of `undefined` as equivalent to "field not present"
by asserting the value `.to.be.undefined` instead of checking key existence.
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> f569eb40 parents commit a94cb40
Sorry, this diff is taking too long to generate.
It may be too large to display on GitHub.