Skip to content

Add ability to mock responses #6

Description

@mdb1

Add ability to use mocked responses in the library instead of actually hitting the network.

This will be useful for quickly testing behaviors (success/error responses) and for the unit tests to avoid hitting the network.

Ideally, we might want to have:

  • Ability to set global approach (mock vs real)
  • Ability to add delay for the mocks (to be able to visually check the loading states)
  • Ability to use a mock response for a specific request (vs global approach)
  • Ability to load mock responses from json files
  • Ability to load mock responses from in-lined json strings

I think @juansanzone has some great ideas on how to accomplish this. Feel free to raise any input/concerns you may have 😄

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions