aboutsummaryrefslogtreecommitdiff
path: root/test/test-markdown-options.js
blob: ef61659437049a58dd63a8ab934b59ec75f5e6fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
	}
});