aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2016-06-22 09:20:24 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2016-06-22 09:20:24 +0200
commit8d7ff10ce3ec2e2190a63769323ea2cf6d5f7e9f (patch)
tree385382188bb2418aae903ec68257c1c4ef5e6280 /test
parent8d4cb810d641be085aee365ad83cd59b7c974cfd (diff)
parent16ebf2a783724527faac2036bc2f971df8dea0a5 (diff)
downloadfreenode-live-2017-presentation-8d7ff10ce3ec2e2190a63769323ea2cf6d5f7e9f.tar
freenode-live-2017-presentation-8d7ff10ce3ec2e2190a63769323ea2cf6d5f7e9f.tar.gz
Merge branch 'bug/markdownSetOptions' of https://github.com/snowyu/reveal.js into dev
Diffstat (limited to 'test')
-rw-r--r--test/simple.md10
-rw-r--r--test/test-markdown-external.html36
-rw-r--r--test/test-markdown-external.js19
3 files changed, 65 insertions, 0 deletions
diff --git a/test/simple.md b/test/simple.md
new file mode 100644
index 0000000..cd57d70
--- /dev/null
+++ b/test/simple.md
@@ -0,0 +1,10 @@
+## Slide 1.1
+
+```js
+var a = 1;
+```
+
+## Slide 1.2
+
+
+## Slide 2
diff --git a/test/test-markdown-external.html b/test/test-markdown-external.html
new file mode 100644
index 0000000..859d0a1
--- /dev/null
+++ b/test/test-markdown-external.html
@@ -0,0 +1,36 @@
+<!doctype html>
+<html lang="en">
+
+ <head>
+ <meta charset="utf-8">
+
+ <title>reveal.js - Test Markdown</title>
+
+ <link rel="stylesheet" href="../css/reveal.css">
+ <link rel="stylesheet" href="qunit-1.12.0.css">
+ </head>
+
+ <body style="overflow: auto;">
+
+ <div id="qunit"></div>
+ <div id="qunit-fixture"></div>
+
+ <div class="reveal" style="display: none;">
+
+ <div class="slides">
+ <section data-markdown="simple.md" data-separator="^\n\n\n" data-separator-vertical="^\n\n"></section>
+ </div>
+
+ </div>
+
+ <script src="../lib/js/head.min.js"></script>
+ <script src="../js/reveal.js"></script>
+ <script src="../plugin/highlight/highlight.js"></script>
+ <script src="../plugin/markdown/marked.js"></script>
+ <script src="../plugin/markdown/markdown.js"></script>
+ <script src="qunit-1.12.0.js"></script>
+
+ <script src="test-markdown-external.js"></script>
+
+ </body>
+</html>
diff --git a/test/test-markdown-external.js b/test/test-markdown-external.js
new file mode 100644
index 0000000..a9ea034
--- /dev/null
+++ b/test/test-markdown-external.js
@@ -0,0 +1,19 @@
+
+
+Reveal.addEventListener( 'ready', function() {
+
+ QUnit.module( 'Markdown' );
+
+ test( 'Vertical separator', function() {
+ strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' );
+ });
+ test( 'language highlighter', function() {
+ strictEqual( document.querySelectorAll( '.hljs-keyword' ).length, 1, 'got rendered highlight tag.' );
+ strictEqual( document.querySelector( '.hljs-keyword' ).innerHTML, 'var', 'the same keyword: var.' );
+ });
+
+
+} );
+
+Reveal.initialize();
+