test for getProgress
This commit is contained in:
parent
6e9a33cf1f
commit
a91f4d601d
1 changed files with 10 additions and 0 deletions
10
test/test.js
10
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' );
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue