From 5cf49561a88565ff94af288408ed7ffed64c8815 Mon Sep 17 00:00:00 2001
From: Hakim El Hattab <hakim.elhattab@gmail.com>
Date: Thu, 22 Aug 2013 21:38:37 -0400
Subject: [PATCH] add test for loop setting

---
 test/test.js | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

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
-- 
GitLab