aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2013-11-21 09:01:18 -0500
committerHakim El Hattab <hakim.elhattab@gmail.com>2013-11-21 09:01:18 -0500
commit60a74ebfa3d699fa475b39b9f94e14e68e6dbc52 (patch)
treee951c099a1c47109488da1cefbda3ec4a58f7181 /test
parent9d0ac527802370597a5f1ab1b3f0dd5b039d33b8 (diff)
downloadfosdem-2018-presentation-60a74ebfa3d699fa475b39b9f94e14e68e6dbc52.tar
fosdem-2018-presentation-60a74ebfa3d699fa475b39b9f94e14e68e6dbc52.tar.gz
fragments are now zero-indexed
Diffstat (limited to 'test')
-rw-r--r--test/test.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/test.js b/test/test.js
index bd5cad1..3570d78 100644
--- a/test/test.js
+++ b/test/test.js
@@ -140,6 +140,9 @@ Reveal.addEventListener( 'ready', function() {
// There's fragments on this slide
Reveal.next();
+ deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: -1 } );
+
+ Reveal.next();
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 } );
Reveal.next();
@@ -149,9 +152,6 @@ Reveal.addEventListener( 'ready', function() {
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 } );
Reveal.next();
- deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 3 } );
-
- Reveal.next();
deepEqual( Reveal.getIndices(), { h: 3, v: 0, f: undefined } );
// We're at the end, this should have no effect
@@ -177,31 +177,31 @@ Reveal.addEventListener( 'ready', function() {
});
test( 'Stepping through fragments', function() {
- Reveal.slide( 2, 0, 0 );
+ Reveal.slide( 2, 0, -1 );
// forwards:
Reveal.next();
- deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'next() goes to next fragment' );
+ deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'next() goes to next fragment' );
Reveal.right();
- deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'right() goes to next fragment' );
+ deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'right() goes to next fragment' );
Reveal.down();
- deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 3 }, 'down() goes to next fragment' );
+ deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'down() goes to next fragment' );
Reveal.down(); // moves to f #3
// backwards:
Reveal.prev();
- deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'prev() goes to prev fragment' );
+ deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'prev() goes to prev fragment' );
Reveal.left();
- deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'left() goes to prev fragment' );
+ deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'left() goes to prev fragment' );
Reveal.up();
- deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'left() goes to prev fragment' );
+ deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: -1 }, 'up() goes to prev fragment' );
});
test( 'Stepping past fragments', function() {