aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/tooltip.js
diff options
context:
space:
mode:
authorChris Rebert <[email protected]>2015-01-05 14:22:49 -0800
committerChris Rebert <[email protected]>2015-01-05 14:22:49 -0800
commitf6a837cbf1eb24429a4356ef95d7a52e6da35b43 (patch)
treee9c0e0f3723b6c8d32a9bac8ed24111f21d667cd /js/tests/unit/tooltip.js
parent08410280091ff1ef77e110c1e5e29eb8f3653a84 (diff)
downloadbootstrap-f6a837cbf1eb24429a4356ef95d7a52e6da35b43.tar.xz
bootstrap-f6a837cbf1eb24429a4356ef95d7a52e6da35b43.zip
Make $(document).tooltip({...}) without a `selector` throw an error
Closes #15484
Diffstat (limited to 'js/tests/unit/tooltip.js')
-rw-r--r--js/tests/unit/tooltip.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js
index 2264ca372..32892f12b 100644
--- a/js/tests/unit/tooltip.js
+++ b/js/tests/unit/tooltip.js
@@ -1107,4 +1107,10 @@ $(function () {
$element.bootstrapTooltip('show')
})
+ test('should throw an error when initializing tooltip on the document object without specifying a delegation selector', function () {
+ throws(function () {
+ $(document).bootstrapTooltip({ title: 'What am I on?' })
+ }, new Error('`selector` option must be specified when initializing tooltip on the window.document object!'))
+ })
+
})