Skip to content

Commit

Permalink
fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed Sep 20, 2021
1 parent cb454b0 commit 0da9821
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/reveal.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions test/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ <h1>4</h1>

QUnit.module( 'Events' );

QUnit.test( 'slidechange', function( assert ) {
QUnit.test( 'beforeslidechange', function( assert ) {
var done = assert.async( 2 );

var normalEvent = function( event ) {
Expand All @@ -794,15 +794,15 @@ <h1>4</h1>
done();
}

Reveal.on( 'slidechange', normalEvent );
Reveal.on( 'beforeslidechange', normalEvent );
Reveal.slide( 2, 0 );
Reveal.off( 'slidechange', normalEvent );
Reveal.off( 'beforeslidechange', normalEvent );

Reveal.on( 'slidechange', blockingEvent );
Reveal.on( 'beforeslidechange', blockingEvent );
Reveal.slide( 3, 0 );
Reveal.off( 'slidechange', blockingEvent );
Reveal.off( 'beforeslidechange', blockingEvent );

assert.strictEqual( Reveal.getIndices().h, 2, 'preventing "slidechange" blocks navigation ' );
assert.strictEqual( Reveal.getIndices().h, 2, 'preventing "beforeslidechange" blocks navigation ' );

});

Expand Down

0 comments on commit 0da9821

Please sign in to comment.