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

Testing utilities cleanup #5514

Merged
merged 13 commits into from
Nov 4, 2019
Merged

Testing utilities cleanup #5514

merged 13 commits into from
Nov 4, 2019

Commits on Nov 4, 2019

  1. Configuration menu
    Copy the full SHA
    ba2d996 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    55d4b53 View commit details
    Browse the repository at this point in the history
  3. 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.
    hwillson authored and benjamn committed Nov 4, 2019
    Configuration menu
    Copy the full SHA
    d40ed8a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    830b886 View commit details
    Browse the repository at this point in the history
  5. Remove the wait testing utility

    We're not using it in AC and it's easy enough to re-create if
    people need it.
    hwillson authored and benjamn committed Nov 4, 2019
    Configuration menu
    Copy the full SHA
    21411d4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    db2892f View commit details
    Browse the repository at this point in the history
  7. Rename the mocks utility folder to mocking

    The mocking utilities aren't mocks themselves, they're intended
    to help build mocks.
    hwillson authored and benjamn committed Nov 4, 2019
    Configuration menu
    Copy the full SHA
    8be01f7 View commit details
    Browse the repository at this point in the history
  8. 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.
    hwillson authored and benjamn committed Nov 4, 2019
    Configuration menu
    Copy the full SHA
    7090c8c View commit details
    Browse the repository at this point in the history
  9. 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.
    benjamn committed Nov 4, 2019
    Configuration menu
    Copy the full SHA
    2839b13 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    83b9395 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e231d8c View commit details
    Browse the repository at this point in the history
  12. 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
    benjamn committed Nov 4, 2019
    Configuration menu
    Copy the full SHA
    de47804 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    5730146 View commit details
    Browse the repository at this point in the history