QUnit.test('should fire show event',function(assert){
...
...
@@ -209,14 +209,14 @@ $(function () {
assert.ok($tooltip.data('bs.tooltip'),'tooltip has data')
assert.ok($._data($tooltip[0],'events').mouseover&&$._data($tooltip[0],'events').mouseout,'tooltip has hover events')
assert.equal($._data($tooltip[0],'events').click[0].namespace,'foo','tooltip has extra click.foo event')
assert.strictEqual($._data($tooltip[0],'events').click[0].namespace,'foo','tooltip has extra click.foo event')
$tooltip.bootstrapTooltip('show')
$tooltip.bootstrapTooltip('destroy')
assert.ok(!$tooltip.hasClass('in'),'tooltip is hidden')
assert.ok(!$._data($tooltip[0],'bs.tooltip'),'tooltip does not have data')
assert.equal($._data($tooltip[0],'events').click[0].namespace,'foo','tooltip still has click.foo')
assert.strictEqual($._data($tooltip[0],'events').click[0].namespace,'foo','tooltip still has click.foo')
assert.ok(!$._data($tooltip[0],'events').mouseover&&!$._data($tooltip[0],'events').mouseout,'tooltip does not have hover events')
})
...
...
@@ -232,7 +232,7 @@ $(function () {
assert.ok($('.tooltip').is('.fade.in'),'tooltip is faded in')
$div.find('a').click()
assert.equal($('.tooltip').length,0,'tooltip was removed from dom')
assert.strictEqual($('.tooltip').length,0,'tooltip was removed from dom')
})
QUnit.test('should show tooltip when toggle is called',function(assert){
...
...
@@ -261,10 +261,10 @@ $(function () {
.bootstrapTooltip('show')
assert.notEqual($('body > .tooltip').length,0,'tooltip is direct descendant of body')
assert.equal($('#qunit-fixture > .tooltip').length,0,'tooltip is not in parent')
assert.strictEqual($('#qunit-fixture > .tooltip').length,0,'tooltip is not in parent')
$tooltip.bootstrapTooltip('hide')
assert.equal($('body > .tooltip').length,0,'tooltip was removed from dom')
assert.strictEqual($('body > .tooltip').length,0,'tooltip was removed from dom')
})
QUnit.test('should add position class before positioning so that position-specific styles are taken into account',function(assert){
...
...
@@ -301,10 +301,10 @@ $(function () {
.bootstrapTooltip()
$tooltip.bootstrapTooltip('show')
assert.equal($('.tooltip').children('.tooltip-inner').text(),'Simple tooltip','title from title attribute is set')
assert.strictEqual($('.tooltip').children('.tooltip-inner').text(),'Simple tooltip','title from title attribute is set')
$tooltip.bootstrapTooltip('hide')
assert.equal($('.tooltip').length,0,'tooltip removed from dom')
assert.strictEqual($('.tooltip').length,0,'tooltip removed from dom')
})
QUnit.test('should prefer title attribute over title option',function(assert){
...
...
@@ -315,10 +315,10 @@ $(function () {
})
$tooltip.bootstrapTooltip('show')
assert.equal($('.tooltip').children('.tooltip-inner').text(),'Simple tooltip','title is set from title attribute while preferred over title option')
assert.strictEqual($('.tooltip').children('.tooltip-inner').text(),'Simple tooltip','title is set from title attribute while preferred over title option')
$tooltip.bootstrapTooltip('hide')
assert.equal($('.tooltip').length,0,'tooltip removed from dom')
assert.strictEqual($('.tooltip').length,0,'tooltip removed from dom')
})
QUnit.test('should use title option',function(assert){
...
...
@@ -329,10 +329,10 @@ $(function () {
})
$tooltip.bootstrapTooltip('show')
assert.equal($('.tooltip').children('.tooltip-inner').text(),'This is a tooltip with some content','title from title option is set')
assert.strictEqual($('.tooltip').children('.tooltip-inner').text(),'This is a tooltip with some content','title from title option is set')
$tooltip.bootstrapTooltip('hide')
assert.equal($('.tooltip').length,0,'tooltip removed from dom')
assert.strictEqual($('.tooltip').length,0,'tooltip removed from dom')
})
QUnit.test('should be placed dynamically with the dynamic placement option',function(assert){
...
...
@@ -356,7 +356,7 @@ $(function () {
assert.ok($('.tooltip').is('.bottom'),'top positioned tooltip is dynamically positioned to bottom')
$topTooltip.bootstrapTooltip('hide')
assert.equal($('.tooltip').length,0,'top positioned tooltip removed from dom')
assert.strictEqual($('.tooltip').length,0,'top positioned tooltip removed from dom')