aboutsummaryrefslogtreecommitdiff
path: root/test/test-markdown-options.html
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-markdown-options.html')
-rw-r--r--test/test-markdown-options.html31
1 files changed, 29 insertions, 2 deletions
diff --git a/test/test-markdown-options.html b/test/test-markdown-options.html
index 653f858..7b2a631 100644
--- a/test/test-markdown-options.html
+++ b/test/test-markdown-options.html
@@ -31,10 +31,37 @@
</div>
- <script src="../dist/reveal.min.js"></script>
<script src="qunit-2.5.0.js"></script>
+ <script src="../dist/reveal.min.js"></script>
+
+ <script>
+ Reveal.initialize({
+ dependencies: [
+ { src: '../plugin/markdown/marked.js' },
+ // Test loading JS files with query strings
+ { src: '../plugin/markdown/markdown.js?query=string' },
+ ],
+ markdown: {
+ smartypants: true
+ }
+ }).then( function() {
+
+ QUnit.module( 'Markdown' );
+
+ QUnit.test( 'Options are set', function( assert ) {
+ assert.strictEqual( marked.defaults.smartypants, true );
+ });
+
+ QUnit.test( 'Smart quotes are activated', function( assert ) {
+ var text = document.querySelector( '.reveal .slides>section>p' ).textContent;
+
+ assert.strictEqual( /['"]/.test( text ), false );
+ assert.strictEqual( /[“”‘’]/.test( text ), true );
+ });
+
+ } );
- <script src="test-markdown-options.js"></script>
+ </script>
</body>
</html>