aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2018-10-11 11:32:23 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2018-10-11 11:32:23 +0200
commit7d66999c7fc1459889df9efdb37f4befa8129135 (patch)
tree9c2cc442b9ecfb36cc1f7f8ced476c6d79833c83 /test
parent387455b755b2cf537130e321e1e04f291b3062d2 (diff)
downloadperl-software-in-gnu-guix-7d66999c7fc1459889df9efdb37f4befa8129135.tar
perl-software-in-gnu-guix-7d66999c7fc1459889df9efdb37f4befa8129135.tar.gz
syntax tweak
Diffstat (limited to 'test')
-rw-r--r--test/test.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/test.js b/test/test.js
index 6e862e8..2738403 100644
--- a/test/test.js
+++ b/test/test.js
@@ -262,8 +262,7 @@ Reveal.addEventListener( 'ready', function() {
QUnit.test( 'Current fragment', function( assert ) {
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
- var fragments = fragmentSlide.querySelectorAll( '.fragment' );
- var lastFragmentIndex = fragments[ fragments.length - 1 ].getAttribute( 'data-fragment-index' );
+ var lastFragmentIndex = [].slice.call( fragmentSlide.querySelectorAll( '.fragment' ) ).pop().getAttribute( 'data-fragment-index' );
Reveal.slide( 2, 0 );
assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment at index -1' );