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/tab.js | 64 ++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'js/tests/unit/tab.js') diff --git a/js/tests/unit/tab.js b/js/tests/unit/tab.js index 1228ae3fa..c2a14c98a 100644 --- a/js/tests/unit/tab.js +++ b/js/tests/unit/tab.js @@ -3,8 +3,8 @@ $(function () { module('tabs plugin') - test('should be defined on jquery object', function () { - ok($(document.body).tab, 'tabs method is defined') + test('should be defined on jquery object', function (assert) { + assert.ok($(document.body).tab, 'tabs method is defined') }) module('tabs', { @@ -18,18 +18,18 @@ $(function () { } }) - test('should provide no conflict', function () { - strictEqual($.fn.tab, undefined, 'tab was set back to undefined (org value)') + test('should provide no conflict', function (assert) { + assert.strictEqual($.fn.tab, undefined, 'tab was set back to undefined (org value)') }) - test('should return jquery collection containing the element', function () { + test('should return jquery collection containing the element', function (assert) { var $el = $('
') var $tab = $el.bootstrapTab() - ok($tab instanceof $, 'returns jquery collection') - strictEqual($tab[0], $el[0], 'collection contains element') + assert.ok($tab instanceof $, 'returns jquery collection') + assert.strictEqual($tab[0], $el[0], 'collection contains element') }) - test('should activate element by tab id', function () { + test('should activate element by tab id', function (assert) { var tabsHTML = '