From b56d97f21065037523ec17f45685916df8aca678 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 20 Jan 2015 19:40:50 -0800 Subject: update JS unit tests to future-proof QUnit 1.16.0 API [skip validator] --- js/tests/unit/tab.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'js/tests/unit/tab.js') diff --git a/js/tests/unit/tab.js b/js/tests/unit/tab.js index 9b2a18d572..fa87169161 100644 --- a/js/tests/unit/tab.js +++ b/js/tests/unit/tab.js @@ -59,14 +59,14 @@ $(function () { equal($('#qunit-fixture').find('.active').attr('id'), 'home') }) - test('should not fire shown when show is prevented', function () { - stop() + test('should not fire shown when show is prevented', function (assert) { + var done = assert.async() $('
') .on('show.bs.tab', function (e) { e.preventDefault() ok(true, 'show event fired') - start() + done() }) .on('shown.bs.tab', function () { ok(false, 'shown event fired') @@ -74,8 +74,8 @@ $(function () { .bootstrapTab('show') }) - test('show and shown events should reference correct relatedTarget', function () { - stop() + test('show and shown events should reference correct relatedTarget', function (assert) { + var done = assert.async() var dropHTML = '