Skip to content

Empty response body is not supported #60

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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