Skip to content

Commit e5b9339

Browse files
jhbalestrincpojer
authored andcommitted
Clarifying the docs about test.only (#5262)
* Clarifying the docs about test.only It wasn't clear that test.only just applys to a single file. * Update GlobalAPI.md
1 parent cd807f3 commit e5b9339

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

docs/GlobalAPI.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,9 @@ until the promise resolves as well.
357357

358358
Also under the aliases: `it.only(name, fn, timeout)` or `fit(name, fn, timeout)`
359359

360-
When you are debugging a large codebase, you will often only want to run a
360+
When you are debugging a large test file, you will often only want to run a
361361
subset of tests. You can use `.only` to specify which tests are the only ones
362-
you want to run.
362+
you want to run in that test file.
363363

364364
Optionally, you can provide a `timeout` (in milliseconds) for specifying how
365365
long to wait before aborting. _Note: The default timeout is 5 seconds._
@@ -376,7 +376,8 @@ test('it is not snowing', () => {
376376
});
377377
```
378378

379-
Only the "it is raining" test will run, since it is run with `test.only`.
379+
Only the "it is raining" test will run in that test file, since it is run with
380+
`test.only`.
380381

381382
Usually you wouldn't check code using `test.only` into source control - you
382383
would use it just for debugging, and remove it once you have fixed the broken

0 commit comments

Comments
 (0)