diff options
author | Vasilii Artemchuk <vsn4ik@gmail.com> | 2017-10-07 01:04:21 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2017-10-07 01:04:21 +0300 |
commit | 1aea9d75175340da7365d134e58075091984d950 (patch) | |
tree | 382c64aff01a42b8add3212d9269d6ed5ce16984 /js/tests/README.md | |
parent | ebc82db8efe129c4e91849373ed018d7e3f0194e (diff) |
Update js/tests/README.md (#24281)
Diffstat (limited to 'js/tests/README.md')
-rw-r--r-- | js/tests/README.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/tests/README.md b/js/tests/README.md index 72ece2d36f..8c8c2f17e8 100644 --- a/js/tests/README.md +++ b/js/tests/README.md @@ -24,7 +24,7 @@ To run the unit test suite via a real web browser, open `index.html` in the brow * Each test should have a unique name clearly stating what unit is being tested. * Each test should test only one unit per test, although one test can include several assertions. Create multiple tests for multiple units of functionality. -* Each test should begin with [`assert.expect`](https://api.qunitjs.com/expect/) to ensure that the expected assertions are run. +* Each test should begin with [`assert.expect`](https://api.qunitjs.com/assert/expect/) to ensure that the expected assertions are run. * Each test should follow the project's [JavaScript Code Guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#js) ### Example tests @@ -33,16 +33,16 @@ To run the unit test suite via a real web browser, open `index.html` in the brow // Synchronous test QUnit.test('should describe the unit being tested', function (assert) { assert.expect(1) - var templateHTML = '<div class="alert alert-danger fade in">' + var templateHTML = '<div class="alert alert-danger fade show">' + '<a class="close" href="#" data-dismiss="alert">×</a>' + '<p><strong>Template necessary for the test.</p>' + '</div>' var $alert = $(templateHTML).appendTo('#qunit-fixture').bootstrapAlert() - $alert.find('.close').click() + $alert.find('.close').trigger('click') // Make assertion - assert.strictEqual($alert.hasClass('in'), false, 'remove .in class on .close click') + assert.strictEqual($alert.hasClass('show'), false, 'remove .show class on .close click') }) // Asynchronous test |