diff options
| author | Vasilii Artemchuk <[email protected]> | 2017-11-09 08:51:19 +0300 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2017-11-09 07:51:19 +0200 |
| commit | 5a2d6c70f4115dee7edfa713f4ff2c2f2cef24da (patch) | |
| tree | ce43f343e957ff6810f869e92a6aaba08d0400a9 /js/tests/unit/carousel.js | |
| parent | 75bdc6d96213a78991a6660d7275597431432270 (diff) | |
| download | bootstrap-5a2d6c70f4115dee7edfa713f4ff2c2f2cef24da.tar.xz bootstrap-5a2d6c70f4115dee7edfa713f4ff2c2f2cef24da.zip | |
Use native pseudo-selectors instead of jQuery selectors (#24713)
Diffstat (limited to 'js/tests/unit/carousel.js')
| -rw-r--r-- | js/tests/unit/carousel.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/tests/unit/carousel.js b/js/tests/unit/carousel.js index 521b24ca4..48752cb91 100644 --- a/js/tests/unit/carousel.js +++ b/js/tests/unit/carousel.js @@ -120,17 +120,17 @@ $(function () { .one('slide.bs.carousel', function (e) { e.preventDefault() setTimeout(function () { - assert.ok($carousel.find('.carousel-item:eq(0)').is('.active'), 'first item still active') - assert.ok($carousel.find('.carousel-indicators li:eq(0)').is('.active'), 'first indicator still active') + assert.ok($carousel.find('.carousel-item:nth-child(1)').is('.active'), 'first item still active') + assert.ok($carousel.find('.carousel-indicators li:nth-child(1)').is('.active'), 'first indicator still active') $carousel.bootstrapCarousel('next') }, 0) }) .one('slid.bs.carousel', function () { setTimeout(function () { - assert.ok(!$carousel.find('.carousel-item:eq(0)').is('.active'), 'first item still active') - assert.ok(!$carousel.find('.carousel-indicators li:eq(0)').is('.active'), 'first indicator still active') - assert.ok($carousel.find('.carousel-item:eq(1)').is('.active'), 'second item active') - assert.ok($carousel.find('.carousel-indicators li:eq(1)').is('.active'), 'second indicator active') + assert.ok(!$carousel.find('.carousel-item:nth-child(1)').is('.active'), 'first item still active') + assert.ok(!$carousel.find('.carousel-indicators li:nth-child(1)').is('.active'), 'first indicator still active') + assert.ok($carousel.find('.carousel-item:nth-child(2)').is('.active'), 'second item active') + assert.ok($carousel.find('.carousel-indicators li:nth-child(2)').is('.active'), 'second indicator active') done() }, 0) }) |
