Skip to content

Commit

Permalink
docs: fix Configuration, JestPlatform and JestObjectAPI docs for 26 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
thymikee committed May 6, 2020
1 parent ab6967b commit 8c4e9cc
Show file tree
Hide file tree
Showing 3 changed files with 704 additions and 2 deletions.
13 changes: 12 additions & 1 deletion website/versioned_docs/version-26.0/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,7 @@ Example:
Sort test path alphabetically.

```js
// testSequencer.js
const Sequencer = require('@jest/test-sequencer').default;

class CustomSequencer extends Sequencer {
Expand All @@ -1100,6 +1101,14 @@ class CustomSequencer extends Sequencer {
module.exports = CustomSequencer;
```

Use it in your Jest config file like this:

```json
{
"testSequencer": "path/to/testSequencer.js"
}
```

### `testTimeout` [number]

Default: `5000`
Expand All @@ -1116,7 +1125,9 @@ This option sets the URL for the jsdom environment. It is reflected in propertie

Default: `real`

Setting this value to `fake` allows the use of fake timers for functions such as `setTimeout`. Fake timers are useful when a piece of code sets a long timeout that we don't want to wait for in a test.
Setting this value to `legacy` or `fake` allows the use of fake timers for functions such as `setTimeout`. Fake timers are useful when a piece of code sets a long timeout that we don't want to wait for in a test.

If the value is `modern`, [`@sinonjs/fake-timers`](https://github.com/sinonjs/fake-timers) will be used as implementation instead of Jest's own legacy implementation. This will be the default fake implementation in Jest 27.

### `transform` [object\<string, pathToTransformer | [pathToTransformer, object]>]

Expand Down

0 comments on commit 8c4e9cc

Please sign in to comment.