presentations

Presentations
Log | Files | Refs

test-markdown-options.js (694B)


      1 Reveal.addEventListener( 'ready', function() {
      2 
      3 	QUnit.module( 'Markdown' );
      4 
      5 	QUnit.test( 'Options are set', function( assert ) {
      6 		assert.strictEqual( marked.defaults.smartypants, true );
      7 	});
      8 
      9 	QUnit.test( 'Smart quotes are activated', function( assert ) {
     10 		var text = document.querySelector( '.reveal .slides>section>p' ).textContent;
     11 
     12 		assert.strictEqual( /['"]/.test( text ), false );
     13 		assert.strictEqual( /[“”‘’]/.test( text ), true );
     14 	});
     15 
     16 } );
     17 
     18 Reveal.initialize({
     19 	dependencies: [
     20 		{ src: '../plugin/markdown/marked.js' },
     21 		// Test loading JS files with query strings
     22 		{ src: '../plugin/markdown/markdown.js?query=string' },
     23 	],
     24 	markdown: {
     25 		smartypants: true
     26 	}
     27 });