summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2018-12-07 17:58:25 +0100
committerWinnie Hellmann <winnie@gitlab.com>2018-12-07 17:58:25 +0100
commit4c862e34753b03467d6c386dd559ea8144265cc7 (patch)
treef390426f1040449f5434bf47fa3776baa241a1b0
parent56f02ce351273ffe4a4cf6f3cb7fcc641c5073c7 (diff)
downloadgitlab-ce-winh-fail-slow-karma-tests.tar.gz
Display time a test has takenwinh-fail-slow-karma-tests
-rw-r--r--spec/javascripts/test_bundle.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js
index 8ec4ac2baf6..13bd400a41b 100644
--- a/spec/javascripts/test_bundle.js
+++ b/spec/javascripts/test_bundle.js
@@ -41,8 +41,9 @@ beforeEach(() => {
});
afterEach(() => {
const now = new Date();
- if (now.getTime() - testStarted.getTime() > 300) {
- fail('too long!');
+ const testDuration = now.getTime() - testStarted.getTime();
+ if (testDuration > 300) {
+ fail(`Test is taking too long! ${testDuration}ms`);
}
});