diff options
| author | Kevin Kirsche <[email protected]> | 2015-03-01 09:33:48 -0500 |
|---|---|---|
| committer | Kevin Kirsche <[email protected]> | 2015-03-03 08:45:07 -0500 |
| commit | 4febcb4b492c322c71bdef579cc4ad99ea86e150 (patch) | |
| tree | 03eed0d888df8e56e40616f1fa3e1ada3928a7d8 /js/tests/unit/alert.js | |
| parent | 4311e09b04763bd4efd20212dbee8c6c95df56dc (diff) | |
| download | bootstrap-4febcb4b492c322c71bdef579cc4ad99ea86e150.tar.xz bootstrap-4febcb4b492c322c71bdef579cc4ad99ea86e150.zip | |
[Fixes #15953] Implement assert.expect in each unit test
[Fixes #15953] Implement `assert.expect` in each unit test
Diffstat (limited to 'js/tests/unit/alert.js')
| -rw-r--r-- | js/tests/unit/alert.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/tests/unit/alert.js b/js/tests/unit/alert.js index 75ae2d2ef..0768a1e11 100644 --- a/js/tests/unit/alert.js +++ b/js/tests/unit/alert.js @@ -4,6 +4,7 @@ $(function () { QUnit.module('alert plugin') QUnit.test('should be defined on jquery object', function (assert) { + assert.expect(1) assert.ok($(document.body).alert, 'alert method is defined') }) @@ -19,10 +20,12 @@ $(function () { }) QUnit.test('should provide no conflict', function (assert) { + assert.expect(1) assert.strictEqual($.fn.alert, undefined, 'alert was set back to undefined (org value)') }) QUnit.test('should return jquery collection containing the element', function (assert) { + assert.expect(2) var $el = $('<div/>') var $alert = $el.bootstrapAlert() assert.ok($alert instanceof $, 'returns jquery collection') @@ -30,6 +33,7 @@ $(function () { }) QUnit.test('should fade element out on clicking .close', function (assert) { + assert.expect(1) var alertHTML = '<div class="alert alert-danger fade in">' + '<a class="close" href="#" data-dismiss="alert">×</a>' + '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>' @@ -42,6 +46,7 @@ $(function () { }) QUnit.test('should remove element when clicking .close', function (assert) { + assert.expect(2) var alertHTML = '<div class="alert alert-danger fade in">' + '<a class="close" href="#" data-dismiss="alert">×</a>' + '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>' @@ -56,6 +61,7 @@ $(function () { }) QUnit.test('should not fire closed when close is prevented', function (assert) { + assert.expect(1) var done = assert.async() $('<div class="alert"/>') .on('close.bs.alert', function (e) { |
