You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/assert/verifySteps.md
+24-24Lines changed: 24 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -22,11 +22,11 @@ The Step API provides an easy way to verify execution logic to a high degree of
22
22
23
23
For example, you can mark steps to observe and validate whether parts of your code are reached correctly, or to check the frequency (how often) an asynchronous code path is executed. You can also capture any unexpected steps, which are automatically detected and shown as part of the test failure.
24
24
25
-
This assertion compares a given array of string values to a list of previously recorded steps, as marked via previous calls to [`assert.step()`](./step.md).
25
+
This assertion compares a given array of string values to a list of steps recorded via calls to [`assert.step()`](./step.md).
26
26
27
-
Calling `verifySteps()` will clear and reset the internal list of steps. This allows multiple independent sequences of `assert.step()` to exist within the same test.
27
+
Calling `assert.verifySteps()` will clear and reset the internal list of steps. This allows multiple independent sequences of `assert.step()` to exist within the same test.
28
28
29
-
Refer to the below examples and learn how to use the Step API in your test suite.
29
+
Refer to the below examples to learn how to use the Step API in your test suite.
30
30
31
31
## Changelog
32
32
@@ -36,14 +36,14 @@ Refer to the below examples and learn how to use the Step API in your test suite
36
36
37
37
### Test event-based interface
38
38
39
-
This example uses a class based on an [`EventEmitter`](https://nodejs.org/api/events.html), such as the one provided by Node.js and other environments:
39
+
These two examples test classes that emits event via an `on()` method. It might be based on an [`EventEmitter`](https://nodejs.org/api/events.html), such as the one found in Node.js and in other environments:
Copy file name to clipboardExpand all lines: docs/api/config/testTimeout.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -28,15 +28,9 @@ Individual tests can override the default `testTimeout` config via [assert.timeo
28
28
29
29
It is recommended to set the default at `3000` or higher (3 seconds). A lower timeout may cause intermittent failures due to unrelated infrastructure delays that are known to sometimes occur inside CI services and other virtual servers.
30
30
31
-
## Introducing a default timeout
32
-
33
-
Prior to QUnit 3, there has not been a default timeout. This meant that a test hang silently for many seconds or minutes before diagnostic details are presented (e.g. after a CI job reaches the maximum run time).
34
-
35
-
QUnit 3.0 will change the default timeout from undefined (Infinity) to 3 seconds.
36
-
37
-
### Deprecated: No timeout set
31
+
## Deprecated: No timeout set
38
32
39
-
Starting in QUnit 2.21, a deprecation warning will be logged if a test takes longer than 3 seconds, when there is no timeout set.
33
+
Starting in QUnit 2.21, a deprecation warning is logged if a test takes longer than 3 seconds, and there is no timeout set.
40
34
41
35
```
42
36
Test {name} took longer than 3000ms, but no timeout was set.
@@ -63,7 +57,7 @@ You can address this warning before upgrading to QUnit 3 as follows:
63
57
64
58
* Or, your test runner of choice may offer other ways to set configuration.
65
59
66
-
For example, to set `testTimeout` via [karma-qunit](https://github.com/karma-runner/karma-qunit/#readme):
60
+
For example, set `testTimeout` via [karma-qunit](https://github.com/karma-runner/karma-qunit/#readme):
67
61
68
62
```js
69
63
config.set({
@@ -77,6 +71,12 @@ You can address this warning before upgrading to QUnit 3 as follows:
77
71
});
78
72
```
79
73
74
+
## Introducing a default timeout
75
+
76
+
Prior to QUnit 3.0, there has not been a default timeout. This meant that a test could hang silently for many seconds or minutes before diagnostic details are presented (e.g. after a CI job reaches the maximum run time).
77
+
78
+
QUnit 3.0 changes the default timeout from undefined (Infinity) to 3 seconds.
79
+
80
80
## Changelog
81
81
82
82
| [QUnit 2.21.0](https://github.com/qunitjs/qunit/releases/tag/2.21.0) | Announce change of default from undefined to `3000`, with a deprecation warning.
0 commit comments