From 78749dd0f44b3c8bc5e6c35aebcc8b9759a1a956 Mon Sep 17 00:00:00 2001 From: Krinkle Date: Wed, 10 Jul 2024 23:44:36 +0000 Subject: [PATCH] Build commit b887075f8ffa8bc894d5e2c9d5d73e1570c95b28 --- api/assert/verifySteps/index.html | 4 +-- api/callbacks/QUnit.on/index.html | 25 ++++++++++++++++++- api/config/scrolltop/index.html | 2 +- .../QUnit.onUncaughtException/index.html | 4 +++ browser/index.html | 2 +- feed.xml | 2 +- 6 files changed, 33 insertions(+), 6 deletions(-) diff --git a/api/assert/verifySteps/index.html b/api/assert/verifySteps/index.html index 99ee2122f..bf9d409eb 100644 --- a/api/assert/verifySteps/index.html +++ b/api/assert/verifySteps/index.html @@ -207,7 +207,7 @@

Test publish/subscribe system

}); -

Multiple steps verifications in one test

+

Multiple step verifications in one test

The internal buffer of observed steps is automatically reset when calling verifySteps().

@@ -295,7 +295,7 @@

Deprecated methods

Removed methods


-

Table of contents

+

Table of contents

diff --git a/api/callbacks/QUnit.on/index.html b/api/callbacks/QUnit.on/index.html index af3dbd4c2..c0832f3bd 100644 --- a/api/callbacks/QUnit.on/index.html +++ b/api/callbacks/QUnit.on/index.html @@ -126,6 +126,7 @@

The console.log(`Test plan: ${runStart.testCounts.total}`); }); +

The suiteStart event

The suiteStart event indicates the beginning of a module. It is eventually be followed by a corresponding suiteEnd event.

@@ -374,6 +375,28 @@

The }); +

The error event

+ +

Version added: QUnit 2.17.0.

+ +

The error event notifies plugins of uncaught global errors during a test run.

+ +

See also QUnit.onUncaughtException() which is where you can report your own uncaught errors.

+ + + + + + + + +
Error|anyerror
+ +
QUnit.on('error', error => {
+  console.error(error);
+});
+
+ diff --git a/api/config/scrolltop/index.html b/api/config/scrolltop/index.html index 3212ad055..553fb316d 100644 --- a/api/config/scrolltop/index.html +++ b/api/config/scrolltop/index.html @@ -75,7 +75,7 @@

QUnit.config.scrolltop

version added: 1.14.0.

Description

-

In browser environments, scrop to the top of the page after the tests are done.

+

In browser environments, scroll to the top of the page after the tests are done.

diff --git a/api/extension/QUnit.onUncaughtException/index.html b/api/extension/QUnit.onUncaughtException/index.html index 4772467c2..ff3f74508 100644 --- a/api/extension/QUnit.onUncaughtException/index.html +++ b/api/extension/QUnit.onUncaughtException/index.html @@ -105,6 +105,10 @@

Description

  • QUnit CLI: process.on('uncaughtException', …)
  • +

    When QUnit receives report of a global error strictly inside a test (or one of its module hooks), the exception is reported to the currently running test as extra failed assertion, and thus the test will be marked as failed. This means that uncaught exceptions (such as calling an undefined function) during QUnit.test.todo callback count as expected failure and not fail the test run.

    + +

    Errors received before tests (e.g. early event callbacks), internally between tests, or around the runEnd event (if the process is still alive for some reason), are emitted as an “error” event to reporters.

    +

    Examples

    const error = new Error('Failed to reverse the polarity of the neutron flow');
    diff --git a/browser/index.html b/browser/index.html
    index 70a784014..e706f52fb 100644
    --- a/browser/index.html
    +++ b/browser/index.html
    @@ -249,7 +249,7 @@ 

    Test results

    Click anywhere on result to expand the entry, which reveals the message of each assertion.

    -

    For failed assertions, the parenthical reports the failed, passed, and total number of assertions. The expanded view also displays the expected and actual asserted value, with a diff to highlight the difference between the two values.

    +

    For failed assertions, the parenthetical reports the failed, passed, and total number of assertions. The expanded view also displays the expected and actual asserted value, with a diff to highlight the difference between the two values.

    diff --git a/feed.xml b/feed.xml index c5094f973..bfb5345cf 100644 --- a/feed.xml +++ b/feed.xml @@ -1 +1 @@ -Jekyll2024-07-10T21:26:46+00:00https://qunitjs.com/feed.xmlQUnitThe powerful, easy-to-use JavaScript testing framework. \ No newline at end of file +Jekyll2024-07-10T23:44:34+00:00https://qunitjs.com/feed.xmlQUnitThe powerful, easy-to-use JavaScript testing framework. \ No newline at end of file