From 7b24f3c47c195b5519ddc2904840db98858ec015 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Fri, 25 Oct 2013 14:14:30 -0700 Subject: QUnit.equals() is deprecated; use QUnit.equal() instead --- js/tests/unit/popover.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'js/tests/unit/popover.js') diff --git a/js/tests/unit/popover.js b/js/tests/unit/popover.js index 767d79864..c9f7d63a7 100644 --- a/js/tests/unit/popover.js +++ b/js/tests/unit/popover.js @@ -53,8 +53,8 @@ $(function () { popover.popover('show') ok($('.popover').length, 'popover was inserted') - equals($('.popover .popover-title').text(), '@fat', 'title correctly inserted') - equals($('.popover .popover-content').text(), 'loves writing tests (╯°□°)╯︵ ┻━┻', 'content correctly inserted') + equal($('.popover .popover-title').text(), '@fat', 'title correctly inserted') + equal($('.popover .popover-content').text(), 'loves writing tests (╯°□°)╯︵ ┻━┻', 'content correctly inserted') popover.popover('hide') ok(!$('.popover').length, 'popover was removed') @@ -69,8 +69,8 @@ $(function () { .popover('show') ok($('.popover').length, 'popover was inserted') - equals($('.popover .popover-title').text(), '@mdo', 'title correctly inserted') - equals($('.popover .popover-content').text(), "loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻", 'content correctly inserted') + equal($('.popover .popover-title').text(), '@mdo', 'title correctly inserted') + equal($('.popover .popover-content').text(), "loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻", 'content correctly inserted') popover.popover('hide') ok(!$('.popover').length, 'popover was removed') @@ -89,8 +89,8 @@ $(function () { .popover('show') ok($('.popover').length, 'popover was inserted') - equals($('.popover .popover-title').text(), '@mdo', 'title correctly inserted') - equals($('.popover .popover-content').text(), "loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻", 'content correctly inserted') + equal($('.popover .popover-title').text(), '@mdo', 'title correctly inserted') + equal($('.popover .popover-content').text(), "loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻", 'content correctly inserted') popover.popover('hide') ok(!$('.popover').length, 'popover was removed') -- cgit v1.2.3 From 4aad52797c9ec43c30561f481f595be178f6ab94 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 6 Dec 2013 12:20:59 +0200 Subject: Use a space after function consistently. --- js/tests/unit/popover.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/tests/unit/popover.js') diff --git a/js/tests/unit/popover.js b/js/tests/unit/popover.js index c9f7d63a7..a57c787b8 100644 --- a/js/tests/unit/popover.js +++ b/js/tests/unit/popover.js @@ -97,7 +97,7 @@ $(function () { $('#qunit-fixture').empty() }) - test("should respect custom classes", function() { + test("should respect custom classes", function () { $.support.transition = false var popover = $('@fat') .appendTo('#qunit-fixture') @@ -118,7 +118,7 @@ $(function () { }) test("should destroy popover", function () { - var popover = $('
').popover({trigger: 'hover'}).on('click.foo', function(){}) + var popover = $('
').popover({trigger: 'hover'}).on('click.foo', function (){}) ok(popover.data('bs.popover'), 'popover has data') ok($._data(popover[0], 'events').mouseover && $._data(popover[0], 'events').mouseout, 'popover has hover event') ok($._data(popover[0], 'events').click[0].namespace == 'foo', 'popover has extra click.foo event') -- cgit v1.2.3 From 5e2ef69e1cc0ee62dfe1206f25030d1f89d9e50f Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 6 Dec 2013 12:23:08 +0200 Subject: Use a space before functions' bracket consistently. --- js/tests/unit/popover.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/tests/unit/popover.js') diff --git a/js/tests/unit/popover.js b/js/tests/unit/popover.js index a57c787b8..2a11e0fdf 100644 --- a/js/tests/unit/popover.js +++ b/js/tests/unit/popover.js @@ -118,7 +118,7 @@ $(function () { }) test("should destroy popover", function () { - var popover = $('
').popover({trigger: 'hover'}).on('click.foo', function (){}) + var popover = $('
').popover({trigger: 'hover'}).on('click.foo', function () {}) ok(popover.data('bs.popover'), 'popover has data') ok($._data(popover[0], 'events').mouseover && $._data(popover[0], 'events').mouseout, 'popover has hover event') ok($._data(popover[0], 'events').click[0].namespace == 'foo', 'popover has extra click.foo event') -- cgit v1.2.3 From eca8ff380388c1187bc2c86e0ae7fa80aa33111e Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 18 Sep 2013 19:50:02 +0300 Subject: Use single quotes consistently. --- js/tests/unit/popover.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'js/tests/unit/popover.js') diff --git a/js/tests/unit/popover.js b/js/tests/unit/popover.js index 2a11e0fdf..5ed4252be 100644 --- a/js/tests/unit/popover.js +++ b/js/tests/unit/popover.js @@ -1,24 +1,24 @@ $(function () { - module("popover") + module('popover') - test("should provide no conflict", function () { + test('should provide no conflict', function () { var popover = $.fn.popover.noConflict() ok(!$.fn.popover, 'popover was set back to undefined (org value)') $.fn.popover = popover }) - test("should be defined on jquery object", function () { + test('should be defined on jquery object', function () { var div = $('
') ok(div.popover, 'popover method is defined') }) - test("should return element", function () { + test('should return element', function () { var div = $('
') ok(div.popover() == div, 'document.body returned') }) - test("should render popover element", function () { + test('should render popover element', function () { $.support.transition = false var popover = $('@mdo') .appendTo('#qunit-fixture') @@ -26,10 +26,10 @@ $(function () { ok($('.popover').length, 'popover was inserted') popover.popover('hide') - ok(!$(".popover").length, 'popover removed') + ok(!$('.popover').length, 'popover removed') }) - test("should store popover instance in popover data object", function () { + test('should store popover instance in popover data object', function () { $.support.transition = false var popover = $('@mdo') .popover() @@ -37,7 +37,7 @@ $(function () { ok(!!popover.data('bs.popover'), 'popover instance exists') }) - test("should get title and content from options", function () { + test('should get title and content from options', function () { $.support.transition = false var popover = $('@fat') .appendTo('#qunit-fixture') @@ -61,7 +61,7 @@ $(function () { $('#qunit-fixture').empty() }) - test("should get title and content from attributes", function () { + test('should get title and content from attributes', function () { $.support.transition = false var popover = $('@mdo') .appendTo('#qunit-fixture') @@ -70,7 +70,7 @@ $(function () { ok($('.popover').length, 'popover was inserted') equal($('.popover .popover-title').text(), '@mdo', 'title correctly inserted') - equal($('.popover .popover-content').text(), "loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻", 'content correctly inserted') + equal($('.popover .popover-content').text(), 'loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻', 'content correctly inserted') popover.popover('hide') ok(!$('.popover').length, 'popover was removed') @@ -78,7 +78,7 @@ $(function () { }) - test("should get title and content from attributes #2", function () { + test('should get title and content from attributes #2', function () { $.support.transition = false var popover = $('@mdo') .appendTo('#qunit-fixture') @@ -90,14 +90,14 @@ $(function () { ok($('.popover').length, 'popover was inserted') equal($('.popover .popover-title').text(), '@mdo', 'title correctly inserted') - equal($('.popover .popover-content').text(), "loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻", 'content correctly inserted') + equal($('.popover .popover-content').text(), 'loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻', 'content correctly inserted') popover.popover('hide') ok(!$('.popover').length, 'popover was removed') $('#qunit-fixture').empty() }) - test("should respect custom classes", function () { + test('should respect custom classes', function () { $.support.transition = false var popover = $('@fat') .appendTo('#qunit-fixture') @@ -117,7 +117,7 @@ $(function () { $('#qunit-fixture').empty() }) - test("should destroy popover", function () { + test('should destroy popover', function () { var popover = $('
').popover({trigger: 'hover'}).on('click.foo', function () {}) ok(popover.data('bs.popover'), 'popover has data') ok($._data(popover[0], 'events').mouseover && $._data(popover[0], 'events').mouseout, 'popover has hover event') -- cgit v1.2.3