examples
examples copied to clipboard
Examples of Mock Service Worker usage with various frameworks and libraries.
Usage examples
Collection of usage examples of Mock Service Worker library.
Example structure
Usage examples have a consistent README structure, so it's easier to comprehend and cross-reference them.
Each example always has the following sections:
- "Getting started", a list of instructions to get this specific example running on your local machine.
- "Key points", highlights of the implementation necessary to achieve the example. Include exact file references and a brief explanation.
Full examples
Complete examples showcase Mock Service Worker integration on all levels: for development, unit, and E2E tests.
React
- REST API with React
- GraphQL API with React (Apollo)
Angular
- REST API with Angular
Scoped examples
Scoped examples illustrate the usage of Mock Service Worker with particular libraries or frameworks.
- Usage with NextJS
- Usage with Storybook
- Usage with Redux Saga
- Usage with Karma