examples
msw-storybook-addon
examples | msw-storybook-addon | |
---|---|---|
2 | 2 | |
644 | 383 | |
1.2% | 0.8% | |
6.5 | 4.9 | |
about 1 month ago | about 1 month ago | |
JavaScript | TypeScript | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
examples
-
How we use Apollo to manage GraphQL data in our React Typescript application
Did you evaluate mock-service-worker? It's a good solution to mocking API requests. When it executes in the browser it uses a service worker to intercept requests, and when it executes in node (e.g. unit tests) it patches the http.Request methods to effectively do the same. Here's an example for mocking Apollo: https://github.com/mswjs/examples/tree/master/examples/graphql-react-apollo
-
Beginners Thread Easy Questions February 2021
I use https://mswjs.io/, here is also an example project that can become handy: https://github.com/mswjs/examples/tree/master/examples/graphql-react-apollo . Reading this article could also help: https://kentcdodds.com/blog/stop-mocking-fetch
msw-storybook-addon
-
Storybook - mocking API calls
As mentioned, we'll be using the MSW addon, which stands for: "Mock Service Worker", it adds a service worker that will intercept and mock our requests.
-
How to structure React components so I can test them with Storybook?
If data is fetched through the API, https://github.com/itaditya/msw-storybook-addon
What are some alternatives?
open-api-mocker - A mock server based in OpenAPI Specification
P2PoW - A P2P Delegated Proof of Work solution for Nano cryptocurrency
testing-nestjs - A repository to show off to the community methods of testing NestJS including Unit Tests, Integration Tests, E2E Tests, pipes, filters, interceptors, GraphQL, Mongo, TypeORM, and more!
mock-requests - The first fetch/XMLHttpRequest network-mocking library that's actually user-friendly
puppeteer-request-mocker - Request mocker for puppeteer
msw - Seamless REST/GraphQL API mocking library for browser and Node.js.
contentful-graphql-vs-rest - A look at the difference between how to fetch and render linked assets and entries in the Rich Text field in Contentful.
http-fake-backend - Build a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
anvil-e-signature-api-node-example - An example app used to showcase Anvil Etch E-Signature API using the node-anvil client.
Strapi - 🚀 Strapi is the leading open-source headless CMS. It’s 100% JavaScript/TypeScript, fully customizable and developer-first.
smoke - :dash: Simple yet powerful file-based mock server with recording abilities