blob: cf3cf0e5fd1e173b96ddf36cc7162dd0d3ab26bd [file] [log] [blame]
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +02001<!doctype html>
2<html lang="en">
3
4 <head>
5 <meta charset="utf-8">
6
7 <title>reveal.js - Test Dependencies</title>
8
9 <link rel="stylesheet" href="../dist/reveal.css">
10 <link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
11 <script src="../node_modules/qunit/qunit/qunit.js"></script>
12 </head>
13
14 <body style="overflow: auto;">
15
16 <div id="qunit"></div>
17 <div id="qunit-fixture"></div>
18
19 <div class="reveal" style="display: none;">
20
21 <div class="slides">
22
23 <section>Slide content</section>
24
25 </div>
26
27 </div>
28
29 <script src="../dist/reveal.js"></script>
30 <script>
31 window.externalScriptSequence = '';
32
Marc Kupietz09b75752023-10-07 09:32:19 +020033 QUnit.config.testTimeout = 30000;
34 QUnit.config.autostart = false;
35 QUnit.module( 'Dependencies' );
36
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020037 Reveal.initialize({
38 dependencies: [
39 { src: 'assets/external-script-a.js' },
40 { src: 'assets/external-script-b.js' },
41 { src: 'assets/external-script-c.js' }
42 ]
43 }).then( () => {
44
Marc Kupietz09b75752023-10-07 09:32:19 +020045 QUnit.start();
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020046
47 QUnit.test( 'Load synchronous scripts', function( assert ) {
48 assert.strictEqual( window.externalScriptSequence, 'ABC', 'Loaded and executed in order' );
49 });
50
51 } );
52 </script>
53
54 </body>
55</html>