Skip to content

Commit

Permalink
Merge pull request #363 from storybookjs/yann/update-ejected-config-docs
Browse files Browse the repository at this point in the history
Docs: Expand ejected config docs with an example
  • Loading branch information
yannbf authored Oct 12, 2023
2 parents 5740667 + 6f7e339 commit 35fc7d5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,25 @@ The Storybook test runner comes with Jest installed as an internal dependency. Y

> If you're already using a compatible version of Jest, the test runner will use it, instead of installing a duplicate version in your node_modules folder.
Here's an example of an ejected file used to extend the tests timeout from Jest:

```ts
// ./test-runner-jest.config.js
const { getJestConfig } = require('@storybook/test-runner');

/**
* @type {import('@jest/types').Config.InitialOptions}
*/
module.exports = {
// The default configuration comes from @storybook/test-runner
...getJestConfig(),
/** Add your own overrides below
* @see https://jestjs.io/docs/configuration
*/
testTimeout: 20000, // default timeout is 15s
};
```

## Test reporters

The test runner uses default Jest reporters, but you can add additional reporters by ejecting the configuration as explained above and overriding (or merging with) the `reporters` property.
Expand Down

0 comments on commit 35fc7d5

Please sign in to comment.