-
Notifications
You must be signed in to change notification settings - Fork 781
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs: Add migration guide for QUnit.config.countStepsAsOne
Closes #1780.
- Loading branch information
Showing
2 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
layout: page-api | ||
title: QUnit.config.countStepsAsOne | ||
excerpt: Count assert.verifySteps() as one assertion for the assert.expect() count. | ||
groups: | ||
- config | ||
redirect_from: | ||
- "/config/countStepsAsOne/" | ||
version_added: "2.21.1" | ||
--- | ||
|
||
Count `assert.verifySteps()` as one assertion for the `assert.expect()` count. | ||
|
||
<table> | ||
<tr> | ||
<th>type</th> | ||
<td markdown="span">`boolean`</td> | ||
</tr> | ||
<tr> | ||
<th>default</th> | ||
<td markdown="span">`false`</td> | ||
</tr> | ||
</table> | ||
|
||
If you have tests that use both `assert.expect()` and `assert.step()` with [`assert.verifySteps()`](../assert/verifySteps.md) in the same test, you may encounter the following warning on QUnit 2.x: | ||
|
||
``` | ||
Counting each assert.step() for assert.expect() is changing | ||
in QUnit 3.0. Omit assert.expect() from tests that use assert.step(), | ||
or enable QUnit.config.countStepsAsOne to prepare for the upgrade. | ||
``` | ||
|
||
Refer to [assert.expect(): Migration guide](../assert/expect.md#migration-guide) for before and after examples. |