diff options
Diffstat (limited to 'test/test-markdown-options.js')
-rw-r--r-- | test/test-markdown-options.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/test-markdown-options.js b/test/test-markdown-options.js new file mode 100644 index 0000000..ef61659 --- /dev/null +++ b/test/test-markdown-options.js @@ -0,0 +1,27 @@ +Reveal.addEventListener( 'ready', 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 ); + }); + +} ); + +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 + } +}); |