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

[v16.x backport] backport multiple test runner features #45602

Closed
wants to merge 14 commits into from

Commits on Dec 9, 2022

  1. test_runner: remove runtime experimental warning

    This commit removes the experimental warning that is emitted
    when the test runner is used. The test runner feature is still
    considered experimental, but this change makes its output
    easier to read.
    
    PR-URL: nodejs#44844
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    cjihrig authored and MoLow committed Dec 9, 2022
    Copy the full SHA
    3f16e33 View commit details
    Browse the repository at this point in the history
  2. doc: remove unnecessary leading commas

    There are several locations in the test_runner API docs where
    the optional first argument to a function was written with a
    leading comma. Since these are first arguments, the commas
    can be removed.
    
    PR-URL: nodejs#44854
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Darshan Sen <raisinten@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    cjihrig authored and MoLow committed Dec 9, 2022
    Copy the full SHA
    588d71e View commit details
    Browse the repository at this point in the history
  3. src: fix test runner coverage

    PR-URL: nodejs#45055
    Fixes: nodejs#45013
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    MoLow committed Dec 9, 2022
    Copy the full SHA
    16b7b2b View commit details
    Browse the repository at this point in the history
  4. test_runner: add --test-name-pattern CLI flag

    This commit adds support for running tests that match a
    regular expression.
    
    Fixes: nodejs#42984
    cjihrig authored and MoLow committed Dec 9, 2022
    Copy the full SHA
    25cf755 View commit details
    Browse the repository at this point in the history
  5. test_runner: call {before,after}Each() on suites

    Prior to this commit, beforeEach() and afterEach() hooks were
    not called on test suites (describe()). This commit addresses that.
    
    Fixes: nodejs#45028
    PR-URL: nodejs#45161
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    cjihrig authored and MoLow committed Dec 9, 2022
    Copy the full SHA
    51c7b47 View commit details
    Browse the repository at this point in the history
  6. test_runner: add extra fields in AssertionError YAML

    Many TAP reporters offer special-case handling of YAML objects
    containing `expected`, `actual`, and `operator` fields, as produced by
    `AssertionError` and similar userland Error classes.
    
    PR-URL: nodejs#44952
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    bengl authored and MoLow committed Dec 9, 2022
    Copy the full SHA
    7a39747 View commit details
    Browse the repository at this point in the history
  7. test_runner: report tap subtest in order

    PR-URL: nodejs#45220
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    MoLow committed Dec 9, 2022
    Copy the full SHA
    e240525 View commit details
    Browse the repository at this point in the history
  8. test_runner: fix afterEach not running on test failures

    test_runner: fix afterEach not running on test failures
    
    PR-URL: nodejs#45204
    Fixes: nodejs#45192
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    MrJithil authored and MoLow committed Dec 9, 2022
    Copy the full SHA
    94174b7 View commit details
    Browse the repository at this point in the history
  9. test_runner: avoid swallowing of asynchronously thrown errors

    Fixes: nodejs#44612
    PR-URL: nodejs#45264
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    fossamagna authored and MoLow committed Dec 9, 2022
    Copy the full SHA
    549b123 View commit details
    Browse the repository at this point in the history
  10. doc: fix test runner's only tests section header

    Only tests are not a subsection of describe/it syntax.
    This commit updates the heading of the 'only tests'
    section to reflect this.
    
    PR-URL: nodejs#45343
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
    Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
    cjihrig authored and MoLow committed Dec 9, 2022
    Copy the full SHA
    5e632e4 View commit details
    Browse the repository at this point in the history
  11. test_runner: support function mocking

    This commit allows tests in the test runner to mock functions
    and methods.
    
    PR-URL: nodejs#45326
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    cjihrig authored and MoLow committed Dec 9, 2022
    Copy the full SHA
    aadc76d View commit details
    Browse the repository at this point in the history
  12. watch: watch for missing dependencies

    PR-URL: nodejs#45348
    Reviewed-By: Ruy Adorno <ruyadorno@google.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    Reviewed-By: Nitzan Uziely <linkgoron@gmail.com>
    MoLow committed Dec 9, 2022
    Copy the full SHA
    a47c61e View commit details
    Browse the repository at this point in the history
  13. test_runner: support watch mode

    PR-URL: nodejs#45214
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    MoLow committed Dec 9, 2022
    Copy the full SHA
    fd7d1dd View commit details
    Browse the repository at this point in the history
  14. test_runner: add initial TAP parser

    Work in progress
    
    PR-URL: nodejs#43525
    Refs: nodejs#43344
    Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    manekinekko authored and MoLow committed Dec 9, 2022
    Copy the full SHA
    57e6777 View commit details
    Browse the repository at this point in the history