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:
authorKushal Pandya <kushalspandya@gmail.com>2019-03-22 10:24:40 +0300
committerKushal Pandya <kushalspandya@gmail.com>2019-03-22 10:24:40 +0300
commit5765c5989a23e6db0f54440bc9bbdb37f5eb3677 (patch)
tree38a59ca10d57a17e707f093c7bdf3b51c410a3d6 /spec/frontend
parentf6772ffb1a35adced2b8f70fb02de77985a363ef (diff)
parentfcf64da04b868fe10e6583eeafd8f015f6b3743e (diff)
Merge branch 'winh-jest-time' into 'master'
Mock and wait for timers in Jest Closes #56056 See merge request gitlab-org/gitlab-ce!26433
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