aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2014-03-12 22:29:01 +0100
committerHakim El Hattab <hakim.elhattab@gmail.com>2014-03-12 22:29:01 +0100
commita91f4d601d7a4133c7ac0a0c4ca7c551edd872a0 (patch)
tree872d38750ae5a4e7809ee9e402bce230fe8485d1
parent6e9a33cf1f5f11f5484bbc67f0f12e10061f72f5 (diff)
downloadfosdem-2018-presentation-a91f4d601d7a4133c7ac0a0c4ca7c551edd872a0.tar
fosdem-2018-presentation-a91f4d601d7a4133c7ac0a0c4ca7c551edd872a0.tar.gz
test for getProgress
-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' );
});