-
Notifications
You must be signed in to change notification settings - Fork 10
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
[fei5850.2.hardfail] Add hard fail support to request mocking #2334
Conversation
🦋 Changeset detectedLatest commit: 2fe2866 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
npm Snapshot: Published🎉 Good news!! We've packaged up the latest commit from this PR (67c6616) and published all packages with changesets to npm. You can install the packages in webapp by running: ./services/static/dev/tools/deploy_wonder_blocks.js --tag="PR2334" Packages can also be installed manually by running: yarn add @khanacademy/wonder-blocks-<package-name>@PR2334 |
A new build was pushed to Chromatic! 🚀https://5e1bf4b385e3fb0020b7073c-izufdnwrxc.chromatic.com/ Chromatic results:
|
Size Change: 0 B Total Size: 100 kB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
5c01a17
to
2fe2866
Compare
Summary:
An oft annoying but sometimes useful feature of Apollo's
MockLink
is that it will hard fail if a request is made that has not been mocked. This is annoying because it forces folks to provide a mock for every request, even if they don't care about that request. However, it is useful when debugging tests to see why a mock isn't matching as expected or what requests are happening (the KA_LOG_FETCHES is useful for seeing this info too, but less accessible).This change adds the ability to turn on hard fails for our request mocking system. I have added this using a fluent API so that it is more easily worked into existing uses of this mocking system.
I've also added tests to verify the new functionality, and added some additional commentary to the types for the mocking framework.
Issue: FEI-5850
Test plan:
yarn test
yarn typecheck