diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2018-07-26 10:17:13 +0000 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2018-07-26 10:17:13 +0000 |
commit | dc31edfb7e104003ebd6682751a250188ac0f381 (patch) | |
tree | 3d880cd639ed8e3d214f3d4cdea9391750edda12 /spec | |
parent | c495f8c1d8a710972cbcf4aac6ad487419cc843c (diff) | |
parent | d8edaf2851451d109769c29785df804e72bf96bf (diff) | |
download | gitlab-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.js | 13 |
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 |