From: Johann-S Date: Sat, 16 Jun 2018 20:33:17 +0000 (+0200) Subject: fix(util): increase util coverage X-Git-Tag: v5.0.0-alpha1~1297 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1cc9a6e332869519fcff2a3d0f976bdad0f14fd;p=thirdparty%2Fbootstrap.git fix(util): increase util coverage --- diff --git a/js/tests/unit/util.js b/js/tests/unit/util.js index 858fee6f4d..fa930dcac2 100644 --- a/js/tests/unit/util.js +++ b/js/tests/unit/util.js @@ -160,4 +160,22 @@ $(function () { sandbox.restore() } }) + + QUnit.test('noop should return an empty function', function (assert) { + assert.expect(1) + Util.noop().call() + assert.ok(typeof Util.noop() === 'function') + }) + + QUnit.test('should return jQuery if present', function (assert) { + assert.expect(2) + + assert.equal(Util.jQuery, $) + + $.noConflict() + + assert.equal(Util.jQuery, jQuery) + + window.$ = jQuery + }) })