Skip to content

Pretender doesn't simulate empty body responses #123

@trek

Description

@trek

An empty response can happen in the real world but makes Pretender fail.

    this.get(`/api/conversations/${conversationId}/mark_read`, function(){
      return [200, {'Content-Type': 'application/json'}, null];
    });

A PR that addresses this issue will:

  • Allow undefined or null values to be passed as the body of a response to simulate real world behavior and verify this behaivor aginst a real server response
  • Add tests to ensure this behavior does not regress
  • Update the README to mention this as a possible response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions