aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2014-09-09 12:42:11 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2014-09-09 12:42:11 +0200
commit4823b267ccecd24a0102be834b3ffdfab5fe2730 (patch)
treeecb57e8331994e66d7788ca0fda14b029fa60fe3 /test
parentcbef64b860e75e010a383543de3c5f478fc4227a (diff)
downloadfosdem-2018-presentation-4823b267ccecd24a0102be834b3ffdfab5fe2730.tar
fosdem-2018-presentation-4823b267ccecd24a0102be834b3ffdfab5fe2730.tar.gz
better test for fragment indices
Diffstat (limited to 'test')
-rw-r--r--test/test.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test.js b/test/test.js
index 6c7270f..3f93d3c 100644
--- a/test/test.js
+++ b/test/test.js
@@ -313,6 +313,13 @@ Reveal.addEventListener( 'ready', function() {
Reveal.slide( 3, 0, 0 );
equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 2, 'both fragments of same index are shown' );
+
+ // This slide has three fragments, first one is index 0, second and third have index 1
+ Reveal.slide( 2, 2, 0 );
+ equal( Reveal.getIndices().f, 0, 'returns correct index for first fragment' );
+
+ Reveal.slide( 2, 2, 1 );
+ equal( Reveal.getIndices().f, 1, 'returns correct index for two fragments with same index' );
});
test( 'Index generation', function() {