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
This commit is contained in:
commit
dc31edfb7e
1 changed files with 13 additions and 0 deletions
|
@ -91,6 +91,19 @@ beforeEach(() => {
|
||||||
Vue.http.interceptors = builtinVueHttpInterceptors.slice();
|
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();
|
const axiosDefaultAdapter = getDefaultAdapter();
|
||||||
|
|
||||||
// render all of our tests
|
// render all of our tests
|
||||||
|
|
Loading…
Reference in a new issue