Skip to content
Snippets Groups Projects
Commit 7e72b10f authored by Hakim El Hattab's avatar Hakim El Hattab
Browse files

unit tests for plugins in multi-instance reveal.js

parent 4f6bdf14
No related branches found
No related tags found
No related merge requests found
......@@ -37,13 +37,15 @@
</div>
<script src="../dist/reveal.es5.js"></script>
<script src="../dist/plugin/zoom.js"></script>
<script>
QUnit.module( 'Multiple reveal.js instances' );
let r1 = new Reveal( document.querySelector( '.deck1 .reveal' ), {
embedded: true,
keyboard: true
keyboard: true,
plugins: [RevealZoom]
} );
r1.initialize();
......@@ -70,6 +72,13 @@
});
QUnit.test( 'Can register plugins independently', function( assert ) {
assert.ok( r1.hasPlugin( 'zoom' ) );
assert.notOk( r2.hasPlugin( 'zoom' ) );
});
</script>
</body>
......
......@@ -39,12 +39,14 @@
<script type="module">
import Reveal from '../dist/reveal.js';
import Zoom from '../plugin/zoom/zoom.js';
QUnit.module( 'Multiple reveal.js instances' );
let r1 = new Reveal( document.querySelector( '.deck1 .reveal' ), {
embedded: true,
keyboard: true
keyboard: true,
plugins: [Zoom]
} );
r1.initialize();
......@@ -71,6 +73,13 @@
});
QUnit.test( 'Can register plugins independently', function( assert ) {
assert.ok( r1.hasPlugin( 'zoom' ) );
assert.notOk( r2.hasPlugin( 'zoom' ) );
});
</script>
<script>
QUnit.test( 'Reveal does not leak to window', function( assert ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment