Skip to content

Empty response body is not supported #60

@kibertoad

Description

@kibertoad

When .toMatchApiSchema() is invoked on a response with no body (which is correct), an error is thrown:

Error: failed to extract response details

    at validateRequiredProps (C:\sources\node\project\node_modules\api-contract-validator\lib\validators.js:79:11)
    at Object.schemaValidator (C:\sources\node\project\node_modules\api-contract-validator\lib\validators.js:22:3)
    at Object.toMatchApiSchema (C:\sources\node\project\node_modules\api-contract-validator\lib\plugins\jest\schema-matcher.js:11:24)
    at __EXTERNAL_MATCHER_TRAP__ (C:\sources\node\project\node_modules\expect\build\index.js:342:30)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions