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

More, improved integration tests for watching #3929

Merged
merged 1 commit into from Jun 13, 2019

Commits on Jun 13, 2019

  1. More, improved integration tests for watching

    To extend the test coverage for mocha in watch mode we add the following
    two tests:
    * Check that test files are reloaded
    * Check that watched dependencies are reloaded
    
    To support this change we consolidate `runMochaJSONWatchAsync`,
    `runMochaJSONRawAsync`, and repeated code in tests into `runMochaWatch`.
    We introduce `invokeMochaAsync` in `test/integration/helpers` as an
    async alternative to `invokeMocha`.
    
    We also eliminate the test for the cursor control character in the
    output. Its usefulness is dubious as it relies on an implementation
    detail and the other tests cover the intended behavior.
    
    We are also more explicit which test fixtures are used. Instead of
    setting `this.testFile` in a `beforeEach` hook we do this explicitly for
    the tests that require it. This prevents interference in tests that do
    not use the file.
    Thomas Scholtes committed Jun 13, 2019
    Copy the full SHA
    f037daf View commit details
    Browse the repository at this point in the history