aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2018-06-16 22:33:17 +0200
committerXhmikosR <[email protected]>2019-02-20 22:05:45 +0200
commita1cc9a6e332869519fcff2a3d0f976bdad0f14fd (patch)
treebffc4d97d8fb3aa733e09527470059f9231b2019 /js
parent096413a9942178aa68925f032822b40900bac346 (diff)
downloadbootstrap-a1cc9a6e332869519fcff2a3d0f976bdad0f14fd.tar.xz
bootstrap-a1cc9a6e332869519fcff2a3d0f976bdad0f14fd.zip
fix(util): increase util coverage
Diffstat (limited to 'js')
-rw-r--r--js/tests/unit/util.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/tests/unit/util.js b/js/tests/unit/util.js
index 858fee6f4..fa930dcac 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
+ })
})