test-dependencies.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>reveal.js - Test Dependencies</title>
  6. <link rel="stylesheet" href="../dist/reveal.css">
  7. <link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
  8. <script src="../node_modules/qunit/qunit/qunit.js"></script>
  9. </head>
  10. <body style="overflow: auto;">
  11. <div id="qunit"></div>
  12. <div id="qunit-fixture"></div>
  13. <div class="reveal" style="display: none;">
  14. <div class="slides">
  15. <section>Slide content</section>
  16. </div>
  17. </div>
  18. <script src="../dist/reveal.js"></script>
  19. <script>
  20. window.externalScriptSequence = '';
  21. Reveal.initialize({
  22. dependencies: [
  23. { src: 'assets/external-script-a.js' },
  24. { src: 'assets/external-script-b.js' },
  25. { src: 'assets/external-script-c.js' }
  26. ]
  27. }).then( () => {
  28. QUnit.module( 'Dependencies' );
  29. QUnit.test( 'Load synchronous scripts', function( assert ) {
  30. assert.strictEqual( window.externalScriptSequence, 'ABC', 'Loaded and executed in order' );
  31. });
  32. } );
  33. </script>
  34. </body>
  35. </html>