From 7c19fee3f1f3a371445981cf7e88a3af92f3b602 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 23 Feb 2015 21:55:07 -0800 Subject: JS unit tests: use modern QUnit assert object everywhere --- js/tests/unit/carousel.js | 138 +++++++++++++++++++++++----------------------- 1 file changed, 69 insertions(+), 69 deletions(-) (limited to 'js/tests/unit/carousel.js') diff --git a/js/tests/unit/carousel.js b/js/tests/unit/carousel.js index 9f6f9ccf2..43667b5f5 100644 --- a/js/tests/unit/carousel.js +++ b/js/tests/unit/carousel.js @@ -3,8 +3,8 @@ $(function () { module('carousel plugin') - test('should be defined on jQuery object', function () { - ok($(document.body).carousel, 'carousel method is defined') + test('should be defined on jQuery object', function (assert) { + assert.ok($(document.body).carousel, 'carousel method is defined') }) module('carousel', { @@ -18,15 +18,15 @@ $(function () { } }) - test('should provide no conflict', function () { - strictEqual($.fn.carousel, undefined, 'carousel was set back to undefined (orig value)') + test('should provide no conflict', function (assert) { + assert.strictEqual($.fn.carousel, undefined, 'carousel was set back to undefined (orig value)') }) - test('should return jquery collection containing the element', function () { + test('should return jquery collection containing the element', function (assert) { var $el = $('
') var $carousel = $el.bootstrapCarousel() - ok($carousel instanceof $, 'returns jquery collection') - strictEqual($carousel[0], $el[0], 'collection contains element') + assert.ok($carousel instanceof $, 'returns jquery collection') + assert.strictEqual($carousel[0], $el[0], 'collection contains element') }) test('should not fire slid when slide is prevented', function (assert) { @@ -34,11 +34,11 @@ $(function () { $('