@@ -19,8 +19,8 @@ environment. You don't have to require or import anything to use them.
19
19
Runs a function after all the tests in this file have completed. If the function
20
20
returns a promise, Jest waits for that promise to resolve before continuing.
21
21
22
- Optionally, you can provide a ` timeout ` (in milliseconds) for specifying how long to wait
23
- before aborting. _ Note: The default timeout is 5 seconds._
22
+ Optionally, you can provide a ` timeout ` (in milliseconds) for specifying how
23
+ long to wait before aborting. _ Note: The default timeout is 5 seconds._
24
24
25
25
This is often useful if you want to clean up some global setup state that is
26
26
shared across tests.
@@ -66,8 +66,8 @@ Runs a function after each one of the tests in this file completes. If the
66
66
function returns a promise, Jest waits for that promise to resolve before
67
67
continuing.
68
68
69
- Optionally, you can provide a ` timeout ` (in milliseconds) for specifying how long to wait
70
- before aborting. _ Note: The default timeout is 5 seconds._
69
+ Optionally, you can provide a ` timeout ` (in milliseconds) for specifying how
70
+ long to wait before aborting. _ Note: The default timeout is 5 seconds._
71
71
72
72
This is often useful if you want to clean up some temporary state that is
73
73
created by each test.
@@ -112,8 +112,8 @@ If you want to run some cleanup just once, after all of the tests run, use
112
112
Runs a function before any of the tests in this file run. If the function
113
113
returns a promise, Jest waits for that promise to resolve before running tests.
114
114
115
- Optionally, you can provide a ` timeout ` (in milliseconds) for specifying how long to wait
116
- before aborting. _ Note: The default timeout is 5 seconds._
115
+ Optionally, you can provide a ` timeout ` (in milliseconds) for specifying how
116
+ long to wait before aborting. _ Note: The default timeout is 5 seconds._
117
117
118
118
This is often useful if you want to set up some global state that will be used
119
119
by many tests.
@@ -157,8 +157,8 @@ Runs a function before each of the tests in this file runs. If the function
157
157
returns a promise, Jest waits for that promise to resolve before running the
158
158
test.
159
159
160
- Optionally, you can provide a ` timeout ` (in milliseconds) for specifying how long to wait
161
- before aborting. _ Note: The default timeout is 5 seconds._
160
+ Optionally, you can provide a ` timeout ` (in milliseconds) for specifying how
161
+ long to wait before aborting. _ Note: The default timeout is 5 seconds._
162
162
163
163
This is often useful if you want to reset some global state that will be used by
164
164
many tests.
@@ -327,8 +327,9 @@ test('did not rain', () => {
327
327
```
328
328
329
329
The first argument is the test name; the second argument is a function that
330
- contains the expectations to test. The third argument (optional) is ` timeout ` (in milliseconds)
331
- for specifying how long to wait before aborting. _ Note: The default timeout is 5 seconds._
330
+ contains the expectations to test. The third argument (optional) is ` timeout `
331
+ (in milliseconds) for specifying how long to wait before aborting. _ Note: The
332
+ default timeout is 5 seconds._
332
333
333
334
> Note: If a ** promise is returned** from ` test ` , Jest will wait for the promise
334
335
> to resolve before letting the test complete. Jest will also wait if you
@@ -358,8 +359,8 @@ When you are debugging a large codebase, you will often only want to run a
358
359
subset of tests. You can use ` .only ` to specify which tests are the only ones
359
360
you want to run.
360
361
361
- Optionally, you can provide a ` timeout ` (in milliseconds) for specifying how long to wait
362
- before aborting. _ Note: The default timeout is 5 seconds._
362
+ Optionally, you can provide a ` timeout ` (in milliseconds) for specifying how
363
+ long to wait before aborting. _ Note: The default timeout is 5 seconds._
363
364
364
365
For example, let's say you had these tests:
365
366
0 commit comments