aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2013-08-22 21:38:37 -0400
committerHakim El Hattab <hakim.elhattab@gmail.com>2013-08-22 21:38:37 -0400
commit5cf49561a88565ff94af288408ed7ffed64c8815 (patch)
treede6ba4460bc6b371986ee87efb585534d9cabff7 /test
parent502b26ecf02839bc24f9e47d08d5439aee24ad9c (diff)
downloadfosdem-2018-presentation-5cf49561a88565ff94af288408ed7ffed64c8815.tar
fosdem-2018-presentation-5cf49561a88565ff94af288408ed7ffed64c8815.tar.gz
add test for loop setting
Diffstat (limited to 'test')
-rw-r--r--test/test.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test.js b/test/test.js
index ef66ea3..7288b01 100644
--- a/test/test.js
+++ b/test/test.js
@@ -186,6 +186,20 @@ Reveal.addEventListener( 'ready', function() {
equal( progressElement.style.display, 'block', 'progress are visible' );
});
+ test( 'Loop', function() {
+ Reveal.configure({ loop: true });
+
+ Reveal.slide( 0, 0 );
+
+ Reveal.left();
+ notEqual( Reveal.getIndices().h, 0, 'looped from start to end' );
+
+ Reveal.right();
+ equal( Reveal.getIndices().h, 0, 'looped from end to start' );
+
+ Reveal.configure({ loop: false });
+ });
+
// ---------------------------------------------------------------
// EVENT TESTS