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:
authorTim Zallmann <tzallmann@gitlab.com>2018-07-26 13:17:13 +0300
committerTim Zallmann <tzallmann@gitlab.com>2018-07-26 13:17:13 +0300
commitdc31edfb7e104003ebd6682751a250188ac0f381 (patch)
tree3d880cd639ed8e3d214f3d4cdea9391750edda12 /spec/javascripts
parentc495f8c1d8a710972cbcf4aac6ad487419cc843c (diff)
parentd8edaf2851451d109769c29785df804e72bf96bf (diff)
Merge branch 'winh-fail-slow-karma-tests' into 'master'
Fail Karma tests that take longer than a second Closes #44174 See merge request gitlab-org/gitlab-ce!20518
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/test_bundle.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js
index bc00fdfd73c..59e472789e2 100644
--- a/spec/javascripts/test_bundle.js
+++ b/spec/javascripts/test_bundle.js
@@ -91,6 +91,19 @@ beforeEach(() => {
Vue.http.interceptors = builtinVueHttpInterceptors.slice();
});
+let longRunningTestTimeoutHandle;
+
+beforeEach((done) => {
+ longRunningTestTimeoutHandle = setTimeout(() => {
+ done.fail('Test is running too long!');
+ }, 1000);
+ done();
+});
+
+afterEach(() => {
+ clearTimeout(longRunningTestTimeoutHandle);
+});
+
const axiosDefaultAdapter = getDefaultAdapter();
// render all of our tests