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

Include documentation for mocking http requests #184

Merged
merged 3 commits into from
Oct 4, 2018
Merged

Conversation

benbarnett
Copy link
Contributor

Simple documentation to describe using fetch-mock for stories.

Following #181 (comment)

@i-like-robots i-like-robots added the documentation A problem with how something is documented (or, not) label Sep 26, 2018
// Stories will be provided a clean instance of fetch-mock to allow mocking of http requests
exports.fetchMock = fetchMock => {
fetchMock.mock('/api/data', { some: 'data' });
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to add something to the example in the story configuration section below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, it should be there instead of here!

@i-like-robots i-like-robots changed the base branch from docs-with-gatsby-2 to master September 27, 2018 07:48
@benbarnett benbarnett merged commit 34ee092 into master Oct 4, 2018
@benbarnett benbarnett deleted the fetch-mock-docs branch October 4, 2018 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation A problem with how something is documented (or, not)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants