update plugin api in tests

This commit is contained in:
Hakim El Hattab 2020-04-17 14:21:20 +02:00
parent e58502b3fb
commit f3f91922db
4 changed files with 12 additions and 11 deletions

View file

@ -246,9 +246,9 @@
<script type="module">
import Reveal from '../js/reveal.js'
import Markdown from '../plugin/markdown/markdown.js'
import markdown from '../plugin/markdown/markdown.js'
let deck1 = new Reveal( document.querySelector( '.deck1' ), { dependencies: [ Markdown ] })
let deck1 = new Reveal( document.querySelector( '.deck1' ), { plugins: [ markdown() ] })
deck1.addEventListener( 'ready', function() {
QUnit.module( 'Inline' );
@ -263,7 +263,7 @@
} );
let deck2 = new Reveal( document.querySelector( '.deck2' ), { dependencies: [ Markdown ] })
let deck2 = new Reveal( document.querySelector( '.deck2' ), { plugins: [ markdown() ] })
deck2.addEventListener( 'ready', function() {
QUnit.module( 'External' );
@ -278,7 +278,7 @@
} );
let deck3 = new Reveal( document.querySelector( '.deck3' ), { dependencies: [ Markdown ] })
let deck3 = new Reveal( document.querySelector( '.deck3' ), { plugins: [ markdown() ] })
deck3.addEventListener( 'ready', function() {
QUnit.module( 'Slide Attributes' );
@ -322,7 +322,7 @@
markdown: {
smartypants: true
},
dependencies: [ Markdown ]
plugins: [ markdown() ]
})
deck4.addEventListener( 'ready', function() {
@ -341,7 +341,7 @@
} );
let deck5 = new Reveal( document.querySelector( '.deck5' ), { dependencies: [ Markdown ] })
let deck5 = new Reveal( document.querySelector( '.deck5' ), { plugins: [ markdown() ] })
deck5.addEventListener( 'ready', function() {
QUnit.module( 'Element Attributes' );

View file

@ -45,7 +45,7 @@
let r1 = new Reveal( document.querySelector( '.deck1 .reveal' ), {
embedded: true,
keyboard: true,
plugins: [RevealZoom]
plugins: [RevealZoom()]
} );
r1.initialize();

View file

@ -39,14 +39,14 @@
<script type="module">
import Reveal from '../dist/reveal.js';
import Zoom from '../plugin/zoom/zoom.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,
plugins: [Zoom]
plugins: [zoom()]
} );
r1.initialize();

View file

@ -58,9 +58,10 @@
var PluginE = { id: 'PluginE' };
var reveal = new Reveal( document.querySelector( '.reveal' ) );
var reveal = new Reveal( document.querySelector( '.reveal' ), {
plugins: [ PluginA ]
} );
reveal.registerPlugin( PluginA );
reveal.registerPlugin( PluginB );
reveal.registerPlugin( PluginC );