From 774ddde41eada2ab4aefa12854e32d6f1027a070 Mon Sep 17 00:00:00 2001 From: Krinkle Date: Sat, 13 Jul 2024 16:21:32 +0000 Subject: [PATCH] Build commit 5ee5ae07ba8c94d07e37122772564d4b192c7ef7 --- api/assert/expect/index.html | 19 ++++++++++++++++--- api/assert/step/index.html | 15 +++++++++++++-- api/assert/verifySteps/index.html | 13 ++++++++++++- feed.xml | 2 +- 4 files changed, 42 insertions(+), 7 deletions(-) diff --git a/api/assert/expect/index.html b/api/assert/expect/index.html index 4aba86ddd..befb2c8ee 100644 --- a/api/assert/expect/index.html +++ b/api/assert/expect/index.html @@ -98,7 +98,18 @@

Description

This can also be used to explicitly require a certain number of assertions to be recorded in a given test. If afterwards the number of assertions does not match the expected count, the test will fail.

-

It is recommended to test asynchronous code with assert.step() or assert.async() instead.

+

It is recommended to test asynchronous code with the assert.verifySteps() or assert.async() methods instead. If you’re using these stricter methods already, consider removing the assert.expect() call. See also the require-expect “never-except-zero” rule of the eslint-plugin-qunit package.

+ +

Changelog

+ + + + + + + + +
UNRELEASEDassert.expect() now counts assert.verifySteps() as one assertion. Steps no longer count separately.

Examples

@@ -137,7 +148,9 @@

Example: Custom assert

Example: Explicit count

-

Require an explicit assertion count.

+

Fail the test if the test did not complete an exact assertion count.

+ +

It is recommended to test callback code with assert.verifySteps() instead, as replacement for relying on assert.expect(). See also the require-expect “never-except-zero” rule of the eslint-plugin-qunit package.

diff --git a/api/assert/step/index.html b/api/assert/step/index.html index e285fdde3..953f69632 100644 --- a/api/assert/step/index.html +++ b/api/assert/step/index.html @@ -94,10 +94,21 @@

Description

-

This assertion registers a passing assertion with the provided string. This and any other steps should be verified later in the test via assert.verifySteps().

+

This and any later steps must be verified before the end of the test via assert.verifySteps().

The Step API provides an easy way to verify execution logic to a high degree of accuracy and precision, whether for asynchronous code, event-driven code, or callback-driven code.

+

Changelog

+ + + + + + + + +
UNRELEASEDassert.expect() now counts assert.verifySteps() as one assertion. Steps no longer count separately.
+

Examples

QUnit.test('example', function (assert) {
@@ -193,7 +204,7 @@ 

Deprecated methods

Removed methods


-

Table of contents

+

Table of contents

diff --git a/api/assert/verifySteps/index.html b/api/assert/verifySteps/index.html index bf9d409eb..71d77795e 100644 --- a/api/assert/verifySteps/index.html +++ b/api/assert/verifySteps/index.html @@ -108,6 +108,17 @@

Description

Refer to the below examples and learn how to use the Step API in your test suite.

+

Changelog

+ + + + + + + + +
UNRELEASEDassert.expect() now counts assert.verifySteps() as one assertion. Steps no longer count separately.
+

Examples

Test event-based interface

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

Deprecated methods

Removed methods


+

Table of contents

diff --git a/feed.xml b/feed.xml index 04a328477..5b7b65e09 100644 --- a/feed.xml +++ b/feed.xml @@ -1 +1 @@ -Jekyll2024-07-13T15:57:15+00:00https://qunitjs.com/feed.xmlQUnitThe powerful, easy-to-use JavaScript testing framework. \ No newline at end of file +Jekyll2024-07-13T16:21:30+00:00https://qunitjs.com/feed.xmlQUnitThe powerful, easy-to-use JavaScript testing framework. \ No newline at end of file