0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-28 20:52:21 +01:00

fix(util): increase util coverage

This commit is contained in:
Johann-S 2018-06-16 22:33:17 +02:00 committed by XhmikosR
parent 096413a994
commit a1cc9a6e33

View File

@ -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
})
})