mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-08-09 16:17:28 +02:00
refactored tests
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
<link rel="stylesheet" href="../dist/reveal.css" />
|
<link rel="stylesheet" href="../dist/reveal.css" />
|
||||||
<link rel="stylesheet" href="../dist/theme/white.css" id="theme" />
|
<link rel="stylesheet" href="../dist/theme/white.css" id="theme" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="../plugin/highlight/monokai.css" />
|
<link rel="stylesheet" href="../dist/plugin/highlight/monokai.css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
@@ -29,7 +29,7 @@ import {
|
|||||||
} from './utils/constants.js'
|
} from './utils/constants.js'
|
||||||
|
|
||||||
// The reveal.js version
|
// The reveal.js version
|
||||||
export const VERSION = '5.2.1';
|
export const VERSION = '6.0.0';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* reveal.js
|
* reveal.js
|
||||||
|
8008
package-lock.json
generated
8008
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
44
package.json
44
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "reveal.js",
|
"name": "reveal.js",
|
||||||
"version": "5.0.5",
|
"version": "6.0.0-rc.1",
|
||||||
"description": "The HTML Presentation Framework",
|
"description": "The HTML Presentation Framework",
|
||||||
"homepage": "https://revealjs.com",
|
"homepage": "https://revealjs.com",
|
||||||
"subdomain": "revealjs",
|
"subdomain": "revealjs",
|
||||||
@@ -83,46 +83,8 @@
|
|||||||
"qunit": "^2.22.0",
|
"qunit": "^2.22.0",
|
||||||
"sass": "^1.80.2",
|
"sass": "^1.80.2",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.2.2",
|
||||||
"vite": "^5.4.9",
|
"vite": "^5.4.10",
|
||||||
"vite-plugin-dts": "^4.2.4"
|
"vite-plugin-dts": "^4.2.4"
|
||||||
},
|
},
|
||||||
"browserslist": "> 2%, not dead",
|
"browserslist": "> 2%, not dead"
|
||||||
"eslintConfig": {
|
|
||||||
"env": {
|
|
||||||
"browser": true,
|
|
||||||
"es6": true
|
|
||||||
},
|
|
||||||
"parser": "@babel/eslint-parser",
|
|
||||||
"parserOptions": {
|
|
||||||
"sourceType": "module",
|
|
||||||
"allowImportExportEverywhere": true,
|
|
||||||
"requireConfigFile": false
|
|
||||||
},
|
|
||||||
"globals": {
|
|
||||||
"module": false,
|
|
||||||
"console": false,
|
|
||||||
"unescape": false,
|
|
||||||
"define": false,
|
|
||||||
"exports": false
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"curly": 0,
|
|
||||||
"eqeqeq": 2,
|
|
||||||
"wrap-iife": [
|
|
||||||
2,
|
|
||||||
"any"
|
|
||||||
],
|
|
||||||
"no-use-before-define": [
|
|
||||||
2,
|
|
||||||
{
|
|
||||||
"functions": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"new-cap": 2,
|
|
||||||
"no-caller": 2,
|
|
||||||
"dot-notation": 0,
|
|
||||||
"no-eq-null": 2,
|
|
||||||
"no-unused-expressions": 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -5,10 +5,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<title>reveal.js - Test Auto-Animate</title>
|
<title>reveal.js - Test Auto-Animate</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../dist/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
|
||||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
<body style="overflow: auto;">
|
||||||
@@ -62,11 +58,15 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../dist/reveal.js"></script>
|
<script type="module">
|
||||||
<script>
|
import 'reveal.css';
|
||||||
|
import 'qunit/qunit/qunit.css';
|
||||||
|
import QUnit from 'qunit';
|
||||||
|
import Reveal from 'reveal.js';
|
||||||
|
|
||||||
QUnit.config.testTimeout = 30000;
|
QUnit.config.testTimeout = 30000;
|
||||||
QUnit.config.reorder = false;
|
QUnit.config.reorder = false;
|
||||||
|
QUnit.config.autostart = false;
|
||||||
|
|
||||||
const slides = Array.prototype.map.call( document.querySelectorAll( '.slides section' ), slide => {
|
const slides = Array.prototype.map.call( document.querySelectorAll( '.slides section' ), slide => {
|
||||||
return {
|
return {
|
||||||
@@ -77,9 +77,11 @@
|
|||||||
};
|
};
|
||||||
} );
|
} );
|
||||||
|
|
||||||
Reveal.initialize().then( async () => {
|
QUnit.module( 'Auto-Animate' );
|
||||||
|
|
||||||
QUnit.module( 'Auto-Animate' );
|
Reveal.initialize().then( () => {
|
||||||
|
|
||||||
|
QUnit.start();
|
||||||
|
|
||||||
QUnit.test( 'Adds data-auto-animate-target', assert => {
|
QUnit.test( 'Adds data-auto-animate-target', assert => {
|
||||||
Reveal.slide(1);
|
Reveal.slide(1);
|
||||||
@@ -111,7 +113,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test( 'Slide specific data-auto-animate-duration', assert => {
|
QUnit.test( 'Slide specific data-auto-animate-duration', assert => {
|
||||||
assert.timeout( 400 );
|
assert.timeout( 2000 );
|
||||||
assert.expect( 1 );
|
assert.expect( 1 );
|
||||||
|
|
||||||
return new Promise( resolve => {
|
return new Promise( resolve => {
|
||||||
|
@@ -5,10 +5,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<title>reveal.js - Test Async Dependencies</title>
|
<title>reveal.js - Test Async Dependencies</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../dist/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
|
||||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
<body style="overflow: auto;">
|
||||||
@@ -26,13 +22,19 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../dist/reveal.js"></script>
|
<script type="module">
|
||||||
<script>
|
import 'reveal.css';
|
||||||
var externalScriptSequence = '';
|
import 'qunit/qunit/qunit.css';
|
||||||
|
import QUnit from 'qunit';
|
||||||
|
import Reveal from 'reveal.js';
|
||||||
|
|
||||||
|
window.externalScriptSequence = '';
|
||||||
|
|
||||||
var scriptCount = 0;
|
var scriptCount = 0;
|
||||||
|
|
||||||
QUnit.config.testTimeout = 30000;
|
QUnit.config.testTimeout = 30000;
|
||||||
QUnit.config.autostart = false;
|
QUnit.config.autostart = false;
|
||||||
|
|
||||||
QUnit.module( 'Async Dependencies' );
|
QUnit.module( 'Async Dependencies' );
|
||||||
|
|
||||||
QUnit.test( 'Async scripts are loaded', function( assert ) {
|
QUnit.test( 'Async scripts are loaded', function( assert ) {
|
||||||
|
@@ -5,10 +5,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<title>reveal.js - Test Dependencies</title>
|
<title>reveal.js - Test Dependencies</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../dist/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
|
||||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
<body style="overflow: auto;">
|
||||||
@@ -26,8 +22,12 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../dist/reveal.js"></script>
|
<script type="module">
|
||||||
<script>
|
import 'reveal.css';
|
||||||
|
import 'qunit/qunit/qunit.css';
|
||||||
|
import QUnit from 'qunit';
|
||||||
|
import Reveal from 'reveal.js';
|
||||||
|
|
||||||
window.externalScriptSequence = '';
|
window.externalScriptSequence = '';
|
||||||
|
|
||||||
QUnit.config.testTimeout = 30000;
|
QUnit.config.testTimeout = 30000;
|
||||||
|
@@ -5,10 +5,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<title>reveal.js - Test Dependencies</title>
|
<title>reveal.js - Test Dependencies</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../dist/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
|
||||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
<body style="overflow: auto;">
|
||||||
@@ -29,8 +25,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import Reveal from '../dist/reveal.mjs'
|
import 'reveal.css';
|
||||||
import Markdown from '../dist/plugin/markdown.mjs'
|
import 'qunit/qunit/qunit.css';
|
||||||
|
import QUnit from 'qunit';
|
||||||
|
import Reveal from 'reveal.js';
|
||||||
|
import Markdown from 'reveal.js/plugin/markdown';
|
||||||
|
|
||||||
QUnit.module( 'Destroy' );
|
QUnit.module( 'Destroy' );
|
||||||
|
|
||||||
|
@@ -5,10 +5,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<title>reveal.js - Test Grid</title>
|
<title>reveal.js - Test Grid</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../dist/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
|
||||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
<body style="overflow: auto;">
|
||||||
@@ -38,8 +34,12 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../dist/reveal.js"></script>
|
<script type="module">
|
||||||
<script>
|
import 'reveal.css';
|
||||||
|
import 'qunit/qunit/qunit.css';
|
||||||
|
import QUnit from 'qunit';
|
||||||
|
import Reveal from 'reveal.js';
|
||||||
|
|
||||||
QUnit.config.testTimeout = 30000;
|
QUnit.config.testTimeout = 30000;
|
||||||
QUnit.config.autostart = false;
|
QUnit.config.autostart = false;
|
||||||
QUnit.module( 'Grid Navigation' );
|
QUnit.module( 'Grid Navigation' );
|
||||||
|
@@ -5,10 +5,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<title>reveal.js - Test Iframe Backgrounds</title>
|
<title>reveal.js - Test Iframe Backgrounds</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../dist/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
|
||||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
<body style="overflow: auto;">
|
||||||
@@ -31,8 +27,11 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../dist/reveal.js"></script>
|
<script type="module">
|
||||||
<script>
|
import 'reveal.css';
|
||||||
|
import 'qunit/qunit/qunit.css';
|
||||||
|
import QUnit from 'qunit';
|
||||||
|
import Reveal from 'reveal.js';
|
||||||
|
|
||||||
QUnit.config.testTimeout = 30000;
|
QUnit.config.testTimeout = 30000;
|
||||||
|
|
||||||
|
@@ -5,10 +5,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<title>reveal.js - Test Iframes</title>
|
<title>reveal.js - Test Iframes</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../dist/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
|
||||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
<body style="overflow: auto;">
|
||||||
@@ -31,8 +27,11 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../dist/reveal.js"></script>
|
<script type="module">
|
||||||
<script>
|
import 'reveal.css';
|
||||||
|
import 'qunit/qunit/qunit.css';
|
||||||
|
import QUnit from 'qunit';
|
||||||
|
import Reveal from 'reveal.js';
|
||||||
|
|
||||||
QUnit.config.testTimeout = 30000;
|
QUnit.config.testTimeout = 30000;
|
||||||
|
|
||||||
|
@@ -5,10 +5,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<title>reveal.js - Test Markdown</title>
|
<title>reveal.js - Test Markdown</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../dist/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
|
||||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
<body style="overflow: auto;">
|
||||||
@@ -315,9 +311,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import Reveal from '../js';
|
import 'reveal.css';
|
||||||
import Markdown from '../plugin/markdown'
|
import 'qunit/qunit/qunit.css';
|
||||||
import Highlight from '../plugin/highlight'
|
import QUnit from 'qunit';
|
||||||
|
import Reveal from 'reveal.js';
|
||||||
|
import Markdown from 'reveal.js/plugin/markdown'
|
||||||
|
import Highlight from 'reveal.js/plugin/highlight'
|
||||||
|
|
||||||
QUnit.config.testTimeout = 30000;
|
QUnit.config.testTimeout = 30000;
|
||||||
|
|
||||||
|
@@ -5,10 +5,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<title>reveal.js - Test Iframes</title>
|
<title>reveal.js - Test Iframes</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../dist/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
|
||||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
<body style="overflow: auto;">
|
||||||
@@ -36,9 +32,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../dist/reveal.js"></script>
|
<script type="module">
|
||||||
<script src="../dist/plugin/zoom.js"></script>
|
import 'reveal.css';
|
||||||
<script>
|
import 'qunit/qunit/qunit.css';
|
||||||
|
import QUnit from 'qunit';
|
||||||
|
import Reveal from 'reveal.js';
|
||||||
|
import RevealZoom from 'reveal.js/plugin/zoom';
|
||||||
|
|
||||||
QUnit.config.testTimeout = 30000;
|
QUnit.config.testTimeout = 30000;
|
||||||
QUnit.module( 'Multiple reveal.js instances' );
|
QUnit.module( 'Multiple reveal.js instances' );
|
||||||
|
@@ -5,10 +5,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<title>reveal.js - Test Iframes</title>
|
<title>reveal.js - Test Iframes</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../dist/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
|
||||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
<body style="overflow: auto;">
|
||||||
@@ -37,9 +33,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
|
import 'reveal.css';
|
||||||
import Reveal from '../js';
|
import 'qunit/qunit/qunit.css';
|
||||||
import Zoom from '../plugin/zoom';
|
import QUnit from 'qunit';
|
||||||
|
import Reveal from 'reveal.js';
|
||||||
|
import Zoom from 'reveal.js/plugin/zoom';
|
||||||
|
|
||||||
QUnit.config.testTimeout = 30000;
|
QUnit.config.testTimeout = 30000;
|
||||||
QUnit.module( 'Multiple reveal.js instances' );
|
QUnit.module( 'Multiple reveal.js instances' );
|
||||||
|
@@ -5,10 +5,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<title>reveal.js - Test PDF exports</title>
|
<title>reveal.js - Test PDF exports</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../dist/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
|
||||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
<body style="overflow: auto;">
|
||||||
@@ -73,8 +69,12 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../dist/reveal.js"></script>
|
<script type="module">
|
||||||
<script>
|
import 'reveal.css';
|
||||||
|
import 'qunit/qunit/qunit.css';
|
||||||
|
import QUnit from 'qunit';
|
||||||
|
import Reveal from 'reveal.js';
|
||||||
|
|
||||||
QUnit.config.testTimeout = 30000;
|
QUnit.config.testTimeout = 30000;
|
||||||
QUnit.config.autostart = false;
|
QUnit.config.autostart = false;
|
||||||
|
|
||||||
|
@@ -5,10 +5,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<title>reveal.js - Test Plugins</title>
|
<title>reveal.js - Test Plugins</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../dist/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
|
||||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
<body style="overflow: auto;">
|
||||||
@@ -26,8 +22,11 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../dist/reveal.js"></script>
|
<script type="module">
|
||||||
<script>
|
import 'reveal.css';
|
||||||
|
import 'qunit/qunit/qunit.css';
|
||||||
|
import QUnit from 'qunit';
|
||||||
|
import Reveal from 'reveal.js';
|
||||||
|
|
||||||
QUnit.config.testTimeout = 30000;
|
QUnit.config.testTimeout = 30000;
|
||||||
QUnit.module( 'Plugins' );
|
QUnit.module( 'Plugins' );
|
||||||
|
@@ -5,10 +5,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<title>reveal.js - Test Scroll View</title>
|
<title>reveal.js - Test Scroll View</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../dist/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
|
||||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
<body style="overflow: auto;">
|
||||||
@@ -43,11 +39,15 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../dist/reveal.js"></script>
|
<script type="module">
|
||||||
<script>
|
import 'reveal.css';
|
||||||
|
import 'qunit/qunit/qunit.css';
|
||||||
|
import QUnit from 'qunit';
|
||||||
|
import Reveal from 'reveal.js';
|
||||||
|
|
||||||
QUnit.config.testTimeout = 30000;
|
QUnit.config.testTimeout = 30000;
|
||||||
QUnit.config.reorder = false;
|
QUnit.config.reorder = false;
|
||||||
|
QUnit.config.autostart = false;
|
||||||
|
|
||||||
function getScrollHeight() {
|
function getScrollHeight() {
|
||||||
return Reveal.getViewportElement().scrollHeight;
|
return Reveal.getViewportElement().scrollHeight;
|
||||||
@@ -57,9 +57,11 @@
|
|||||||
return Reveal.getViewportElement().offsetHeight;
|
return Reveal.getViewportElement().offsetHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QUnit.module( 'Scroll View' );
|
||||||
|
|
||||||
Reveal.initialize({ view: 'scroll' }).then( async () => {
|
Reveal.initialize({ view: 'scroll' }).then( async () => {
|
||||||
|
|
||||||
QUnit.module( 'Scroll View' );
|
QUnit.start();
|
||||||
|
|
||||||
QUnit.test( 'Activates', assert => {
|
QUnit.test( 'Activates', assert => {
|
||||||
assert.ok( getScrollHeight() > getViewportHeight(), 'Is overflowing' );
|
assert.ok( getScrollHeight() > getViewportHeight(), 'Is overflowing' );
|
||||||
|
@@ -5,10 +5,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<title>reveal.js - Test State</title>
|
<title>reveal.js - Test State</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../dist/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
|
||||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
<body style="overflow: auto;">
|
||||||
@@ -36,8 +32,11 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../dist/reveal.js"></script>
|
<script type="module">
|
||||||
<script>
|
import 'reveal.css';
|
||||||
|
import 'qunit/qunit/qunit.css';
|
||||||
|
import QUnit from 'qunit';
|
||||||
|
import Reveal from 'reveal.js';
|
||||||
|
|
||||||
Reveal.initialize();
|
Reveal.initialize();
|
||||||
|
|
||||||
|
@@ -5,10 +5,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<title>reveal.js - Tests</title>
|
<title>reveal.js - Tests</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../dist/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
|
||||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
<body style="overflow: auto;">
|
||||||
@@ -81,8 +77,12 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../dist/reveal.js"></script>
|
<script type="module">
|
||||||
<script>
|
import 'reveal.css';
|
||||||
|
import 'qunit/qunit/qunit.css';
|
||||||
|
import QUnit from 'qunit';
|
||||||
|
import Reveal from 'reveal.js';
|
||||||
|
|
||||||
QUnit.config.testTimeout = 30000;
|
QUnit.config.testTimeout = 30000;
|
||||||
|
|
||||||
window.location.hash = '';
|
window.location.hash = '';
|
||||||
|
@@ -6,6 +6,7 @@ import fs from 'fs';
|
|||||||
const themeFiles = fs
|
const themeFiles = fs
|
||||||
.readdirSync(resolve(__dirname, 'css/theme'))
|
.readdirSync(resolve(__dirname, 'css/theme'))
|
||||||
.filter((file) => file.endsWith('.scss'));
|
.filter((file) => file.endsWith('.scss'));
|
||||||
|
|
||||||
const themeEntries = themeFiles.reduce((acc, file) => {
|
const themeEntries = themeFiles.reduce((acc, file) => {
|
||||||
acc[`theme/${file.replace('.scss', '')}`] = resolve(__dirname, `css/theme/${file}`);
|
acc[`theme/${file.replace('.scss', '')}`] = resolve(__dirname, `css/theme/${file}`);
|
||||||
return acc;
|
return acc;
|
||||||
|
@@ -31,8 +31,9 @@ export default defineConfig({
|
|||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
// Matches the exported paths in package.json
|
// Matches the exported paths in package.json
|
||||||
'reveal.js/plugin': './plugin',
|
'reveal.js/plugin': '/plugin',
|
||||||
'reveal.js': '/js',
|
'reveal.js': '/js',
|
||||||
|
'reveal.css': '/css/reveal.scss',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [dts({ insertTypesEntry: true, rollupTypes: true })],
|
plugins: [dts({ insertTypesEntry: true, rollupTypes: true })],
|
||||||
|
Reference in New Issue
Block a user