diff options
author | Evan Read <eread@gitlab.com> | 2019-03-12 03:00:13 +0000 |
---|---|---|
committer | Evan Read <eread@gitlab.com> | 2019-03-12 03:00:13 +0000 |
commit | 54df720039616f413a8820d12d0f1ff5d08c3daf (patch) | |
tree | 604ece963b82b2eecce9a5f2f7d18034451ad2a6 | |
parent | 8f9189557d85f085ec3cfa9e44708daf267882f5 (diff) | |
parent | b1184de452510245e379bbeb46513c1fa7d22cc2 (diff) | |
download | gitlab-ce-54df720039616f413a8820d12d0f1ff5d08c3daf.tar.gz |
Merge branch 'docs-settesttimeout-jest-fe' into 'master'
Update setTestTimeout documentation
See merge request gitlab-org/gitlab-ce!25932
-rw-r--r-- | doc/development/testing_guide/frontend_testing.md | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/development/testing_guide/frontend_testing.md b/doc/development/testing_guide/frontend_testing.md index feeba36b073..9bfb1e69f9e 100644 --- a/doc/development/testing_guide/frontend_testing.md +++ b/doc/development/testing_guide/frontend_testing.md @@ -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); + // ... + }); }); ``` |