Update setTestTimeout documentation

This commit is contained in:
Luke Bennett 2019-03-12 03:00:12 +00:00 committed by Evan Read
parent 8f9189557d
commit b1184de452
1 changed files with 6 additions and 5 deletions

View File

@ -35,15 +35,16 @@ If your test exceeds that time, it will fail.
If you cannot improve the performance of the tests, you can increase the timeout
for a specific test using
[`jest.setTimeout`](https://jestjs.io/docs/en/jest-object#jestsettimeouttimeout).
[`setTestTimeout`](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/spec/frontend/helpers/timeout.js).
```javascript
beforeAll(() => {
jest.setTimeout(500);
});
import { setTestTimeout } from 'helpers/timeout';
describe('Component', () => {
// ...
it('does something amazing', () => {
setTestTimeout(500);
// ...
});
});
```