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

Migrate unit tests to Mocha #5600

Merged
merged 11 commits into from Apr 9, 2020
Merged

Migrate unit tests to Mocha #5600

merged 11 commits into from Apr 9, 2020

Commits on Apr 8, 2020

  1. chore: Migrate tests to Mocha

    Rather than maintain our own test runner we should instead lean on the
    community and use Mocha which is very popular and also our test runner
    of choice in DevTools too.
    
    Note that this commit doesn't remove the TestRunner source as it's still
    used for other unit tests, but they will be updated in a future PR and
    then we can remove the TestRunner.
    
    The main bulk of this PR is updating the tests as the old TestRunner
    passed in contextual data via the `it` function callback whereas Mocha
    does not, so we introduce some helpers for the tests to make it easier.
    jackfranklin committed Apr 8, 2020
    Copy the full SHA
    c72e452 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    38c1bc0 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    0a29cb8 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    9ab21cf View commit details
    Browse the repository at this point in the history
  5. Use eslint-plugin-mocha to ensure no focused tests

    Our custom TestRunner used to look for these but now we aren't using it
    let's enforce it using ESLint.
    jackfranklin committed Apr 8, 2020
    Copy the full SHA
    7b94a32 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    fc79ba1 View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    f51bd54 View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    d602cd9 View commit details
    Browse the repository at this point in the history
  9. Rework test browser and page setup

    Not all tests need a global browser + page, so we have helpers that can
    be imported on a per-test basis.
    jackfranklin committed Apr 8, 2020
    Copy the full SHA
    3ab5882 View commit details
    Browse the repository at this point in the history
  10. Copy the full SHA
    0d14c1a View commit details
    Browse the repository at this point in the history
  11. Copy the full SHA
    91c16a9 View commit details
    Browse the repository at this point in the history