Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(msw): allow mock delay override via function #945

Merged
merged 2 commits into from
Sep 28, 2023

Commits on Sep 21, 2023

  1. feat(msw): allow mock delay override via function

    This adds the possibility to override MSW mocks with a dynamic delay
    using a function that returns a number, making API calls more similar to
    real-world ones, where responses can potentially come back at different
    times:
    
    ```js
    {
      // ... other options ...
      override: {
        mock: {
          delay: () => { ... }
        }
      }
    }
    ```
    
    This change is backwards compatible and the previous default value has
    been maintained.
    Anderson Mesquita committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    9622e1a View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2023

  1. Configuration menu
    Copy the full SHA
    7a976cd View commit details
    Browse the repository at this point in the history