Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2019-03-21 20:05:21 +0300
committerWinnie Hellmann <winnie@gitlab.com>2019-03-21 20:05:21 +0300
commitd1251b42a09e0aaea6300f9dfc92377d24ea762e (patch)
treecf606096b4ce8434c6504927f78e278571d2c539 /spec/frontend
parent939140c33edc016955019ba0c65edb90fd87d897 (diff)
Wait for pending timers in Jest
Diffstat (limited to 'spec/frontend')
-rw-r--r--spec/frontend/test_setup.js5
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