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

test_runner: support handling errors from outside of tests #46962

Merged
merged 4 commits into from
Mar 7, 2023

Commits on Mar 7, 2023

  1. test_runner: give the root test a harness reference

    This commit replaces the 'coverage' reference inside of the Test
    class with a more generic harness reference which includes
    coverage. This will let the root test more easily track process
    level state such as code coverage, uncaughtException handlers,
    and the state of bootstrapping.
    
    PR-URL: nodejs#46962
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    cjihrig committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    b191f09 View commit details
    Browse the repository at this point in the history
  2. test_runner: track bootstrapping process

    This commit updates the test harness and root test to track
    when bootstrapping has completed.
    
    PR-URL: nodejs#46962
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    cjihrig committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    4e3bc06 View commit details
    Browse the repository at this point in the history
  3. test_runner: throw if harness is not bootstrapped

    This commit updates the test harness to re-throw uncaught errors
    if bootstrapping has not completed. This updates the existing
    logic which tried to detect a specific error code.
    
    PR-URL: nodejs#46962
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    cjihrig committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    e079aa8 View commit details
    Browse the repository at this point in the history
  4. test_runner: handle errors not bound to tests

    This commit addresses a previously untested branch of the code.
    It is possible when using the test runner that an error occurs
    outside of a test. In this case, the test runner would simply
    rethrow the error. This commit updates the logic to handle the
    error in the same fashion as other uncaughtExceptions.
    
    PR-URL: nodejs#46962
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    cjihrig committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    3d63d53 View commit details
    Browse the repository at this point in the history