From: Hakim El Hattab Date: Fri, 23 Aug 2013 01:38:37 +0000 (-0400) Subject: add test for loop setting X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=5cf49561a88565ff94af288408ed7ffed64c8815;p=reveal.js.git add test for loop setting --- 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