-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Testing utilities cleanup #5514
Commits on Nov 4, 2019
-
Configuration menu - View commit details
-
Copy full SHA for ba2d996 - Browse repository at this point
Copy the full SHA ba2d996View commit details -
Configuration menu - View commit details
-
Copy full SHA for 55d4b53 - Browse repository at this point
Copy the full SHA 55d4b53View commit details -
Move testing utilities to
src/utilities/testing
Since we're combining all core + React testing utilities, let's get them out of the `__tests__` dir. It seemed a bit strange to create a separate `testing` bundle from a `__tests__` source location.
Configuration menu - View commit details
-
Copy full SHA for d40ed8a - Browse repository at this point
Copy the full SHA d40ed8aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 830b886 - Browse repository at this point
Copy the full SHA 830b886View commit details -
Remove the
wait
testing utilityWe're not using it in AC and it's easy enough to re-create if people need it.
Configuration menu - View commit details
-
Copy full SHA for 21411d4 - Browse repository at this point
Copy the full SHA 21411d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for db2892f - Browse repository at this point
Copy the full SHA db2892fView commit details -
Rename the
mocks
utility folder tomocking
The mocking utilities aren't mocks themselves, they're intended to help build mocks.
Configuration menu - View commit details
-
Copy full SHA for 8be01f7 - Browse repository at this point
Copy the full SHA 8be01f7View commit details -
Build testing bundle from new utilities location
Make sure the utilities previously exported from the React testing location are included, and remove the old testing directories.
Configuration menu - View commit details
-
Copy full SHA for 7090c8c - Browse repository at this point
Copy the full SHA 7090c8cView commit details -
Use ApolloLink#setOnError to set rejection function.
This method will allow us to avoid passing Promise reject functions as the first argument to mockSingleLink and the MockLink constructor, to avoid a breaking change for developers using those testing utilities.
Configuration menu - View commit details
-
Copy full SHA for 2839b13 - Browse repository at this point
Copy the full SHA 2839b13View commit details -
Configuration menu - View commit details
-
Copy full SHA for 83b9395 - Browse repository at this point
Copy the full SHA 83b9395View commit details -
Configuration menu - View commit details
-
Copy full SHA for e231d8c - Browse repository at this point
Copy the full SHA e231d8cView commit details -
Refactor mockSingleLink rejection handling to use setOnError method.
These changes were accomplished using the recently added src/codemods/mockLinkRejection.ts codemod script, via jscodeshift: npm run build npx jscodeshift -t dist/codemods/mockLinkRejection.js src/**/*.ts
Configuration menu - View commit details
-
Copy full SHA for de47804 - Browse repository at this point
Copy the full SHA de47804View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5730146 - Browse repository at this point
Copy the full SHA 5730146View commit details