From 73e3db0a2f0134d4755b8bd4153cb1b6b3d9842d Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 15 Sep 2014 20:01:04 -0700 Subject: [PATCH] Must explicitly destroy tooltip in SVG unit test since its container is body. Leaking tooltips across tests leads to confusion and sadness. --- js/tests/unit/tooltip.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index b578704af4..c75924e9ff 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -768,6 +768,8 @@ $(function () { var offset = $('.tooltip').offset() $styles.remove() ok(Math.abs(offset.left - 88) <= 1, 'tooltip has correct horizontal location') + $circle.bootstrapTooltip('hide') + equal($('.tooltip').length, 0, 'tooltip removed from dom') start() }) .bootstrapTooltip({ container: 'body', placement: 'top', trigger: 'manual' })