diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-11-08 15:30:50 +0100 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2018-11-08 15:38:16 +0100 |
commit | 239d937ba00229a915822fbd6a22d68651fe5b27 (patch) | |
tree | 140adece2ca791fc5dc438862007755002ef9715 | |
parent | 369631c84195f6b8b26624d5647ae994e64b77e8 (diff) | |
download | gitlab-ce-winh-fail-karma-for-warn.tar.gz |
Fail tests for calls to console.warn()winh-fail-karma-for-warn
-rw-r--r-- | spec/javascripts/test_bundle.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js index 96c0844f83c..2d70a6b6cbf 100644 --- a/spec/javascripts/test_bundle.js +++ b/spec/javascripts/test_bundle.js @@ -106,6 +106,18 @@ afterEach(() => { clearTimeout(longRunningTestTimeoutHandle); }); +beforeEach(done => { + const originalWarn = console.warn; + spyOn(console, 'warn').and.callFake(message => { + if (message.startsWith('[Bootstrap-Vue warn]:')) { + done.fail(message); + } else { + originalWarn(message); + } + }); + done(); +}); + const axiosDefaultAdapter = getDefaultAdapter(); // render all of our tests |