diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2019-03-21 18:05:21 +0100 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2019-03-21 18:05:21 +0100 |
commit | d1251b42a09e0aaea6300f9dfc92377d24ea762e (patch) | |
tree | cf606096b4ce8434c6504927f78e278571d2c539 /spec | |
parent | 939140c33edc016955019ba0c65edb90fd87d897 (diff) | |
download | gitlab-ce-d1251b42a09e0aaea6300f9dfc92377d24ea762e.tar.gz |
Wait for pending timers in Jest
Diffstat (limited to 'spec')
-rw-r--r-- | spec/frontend/test_setup.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/frontend/test_setup.js b/spec/frontend/test_setup.js index 8c36d8ff49f..006fc60ef57 100644 --- a/spec/frontend/test_setup.js +++ b/spec/frontend/test_setup.js @@ -3,6 +3,11 @@ import Translate from '~/vue_shared/translate'; import axios from '~/lib/utils/axios_utils'; import { initializeTestTimeout } from './helpers/timeout'; +// wait for pending setTimeout()s +afterEach(() => { + jest.runAllTimers(); +}); + initializeTestTimeout(300); // fail tests for unmocked requests |