aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2013-08-22 19:46:35 -0400
committerHakim El Hattab <hakim.elhattab@gmail.com>2013-08-22 19:46:35 -0400
commitd49ff9aa5ff99d73e26aa030ef7099164a4849e3 (patch)
tree9db2f747f28b6e377a21fba556cc4e5f25a108e4 /test
parentf61ee9a693dc6fc167c65665a3e17de9566ffe9b (diff)
downloadfosdem-2018-presentation-d49ff9aa5ff99d73e26aa030ef7099164a4849e3.tar
fosdem-2018-presentation-d49ff9aa5ff99d73e26aa030ef7099164a4849e3.tar.gz
include info about which slide the assertion applies to
Diffstat (limited to 'test')
-rw-r--r--test/test.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/test.js b/test/test.js
index 6e11f00..df93661 100644
--- a/test/test.js
+++ b/test/test.js
@@ -30,24 +30,26 @@ Reveal.addEventListener( 'ready', function() {
test( 'Reveal.isFirstSlide', function() {
Reveal.slide( 0 );
- ok( Reveal.isFirstSlide() === true, 'returns true' );
+ ok( Reveal.isFirstSlide() === true, 'returns true after Reveal.slide( 0 )' );
Reveal.slide( 1 );
- ok( Reveal.isFirstSlide() === false, 'returns false after navigation' );
+ ok( Reveal.isFirstSlide() === false, 'returns false after Reveal.slide( 1 )' );
Reveal.slide( 0 );
- ok( Reveal.isFirstSlide() === true, 'returns true after navigation' );
+ ok( Reveal.isFirstSlide() === true, 'returns true after Reveal.slide( 0 )' );
});
test( 'Reveal.isLastSlide', function() {
Reveal.slide( 0 );
- ok( Reveal.isLastSlide() === false, 'returns false' );
+ ok( Reveal.isLastSlide() === false, 'returns false after Reveal.slide( 0 )' );
- Reveal.slide( document.querySelectorAll( '.reveal .slides>section' ).length - 1 );
- ok( Reveal.isLastSlide() === true, 'returns true after navigation' );
+ var lastSlideIndex = document.querySelectorAll( '.reveal .slides>section' ).length - 1;
+
+ Reveal.slide( lastSlideIndex );
+ ok( Reveal.isLastSlide() === true, 'returns true after Reveal.slide( '+ lastSlideIndex +' )' );
Reveal.slide( 0 );
- ok( Reveal.isLastSlide() === false, 'returns false after navigation' );
+ ok( Reveal.isLastSlide() === false, 'returns false after Reveal.slide( 0 )' );
});
test( 'Reveal.getIndices', function() {