diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-12-07 17:58:25 +0100 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2018-12-07 17:58:25 +0100 |
commit | 4c862e34753b03467d6c386dd559ea8144265cc7 (patch) | |
tree | f390426f1040449f5434bf47fa3776baa241a1b0 | |
parent | 56f02ce351273ffe4a4cf6f3cb7fcc641c5073c7 (diff) | |
download | gitlab-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.js | 5 |
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`); } }); |