From 4febcb4b492c322c71bdef579cc4ad99ea86e150 Mon Sep 17 00:00:00 2001 From: Kevin Kirsche Date: Sun, 1 Mar 2015 09:33:48 -0500 Subject: [Fixes #15953] Implement assert.expect in each unit test [Fixes #15953] Implement `assert.expect` in each unit test --- js/tests/unit/carousel.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'js/tests/unit/carousel.js') diff --git a/js/tests/unit/carousel.js b/js/tests/unit/carousel.js index 4cae5e46e..9c1c968e8 100644 --- a/js/tests/unit/carousel.js +++ b/js/tests/unit/carousel.js @@ -4,6 +4,7 @@ $(function () { QUnit.module('carousel plugin') QUnit.test('should be defined on jQuery object', function (assert) { + assert.expect(1) assert.ok($(document.body).carousel, 'carousel method is defined') }) @@ -19,10 +20,12 @@ $(function () { }) QUnit.test('should provide no conflict', function (assert) { + assert.expect(1) assert.strictEqual($.fn.carousel, undefined, 'carousel was set back to undefined (orig value)') }) QUnit.test('should return jquery collection containing the element', function (assert) { + assert.expect(2) var $el = $('
') var $carousel = $el.bootstrapCarousel() assert.ok($carousel instanceof $, 'returns jquery collection') @@ -30,6 +33,7 @@ $(function () { }) QUnit.test('should not fire slid when slide is prevented', function (assert) { + assert.expect(1) var done = assert.async() $('