aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/test.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test.js b/test/test.js
index e833bd4..8e5697f 100644
--- a/test/test.js
+++ b/test/test.js
@@ -116,6 +116,16 @@ Reveal.addEventListener( 'ready', function() {
equal( Reveal.getCurrentSlide(), secondSlide, 'current is slide #1' );
});
+ test( 'Reveal.getProgress', function() {
+ Reveal.slide( 0, 0 );
+ strictEqual( Reveal.getProgress(), 0, 'progress is 0 on first slide' );
+
+ var lastSlideIndex = document.querySelectorAll( '.reveal .slides>section' ).length - 1;
+
+ Reveal.slide( lastSlideIndex, 0 );
+ strictEqual( Reveal.getProgress(), 1, 'progress is 1 on last slide' );
+ });
+
test( 'Reveal.getScale', function() {
ok( typeof Reveal.getScale() === 'number', 'has scale' );
});