summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2018-07-26 10:17:13 +0000
committerTim Zallmann <tzallmann@gitlab.com>2018-07-26 10:17:13 +0000
commitdc31edfb7e104003ebd6682751a250188ac0f381 (patch)
tree3d880cd639ed8e3d214f3d4cdea9391750edda12 /spec
parentc495f8c1d8a710972cbcf4aac6ad487419cc843c (diff)
parentd8edaf2851451d109769c29785df804e72bf96bf (diff)
downloadgitlab-ce-dc31edfb7e104003ebd6682751a250188ac0f381.tar.gz
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')
-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