2016-12-08 09:41:55 +00:00
|
|
|
Reveal.addEventListener( 'ready', function() {
|
|
|
|
|
|
|
|
QUnit.module( 'Markdown' );
|
|
|
|
|
2018-01-22 14:35:15 +00:00
|
|
|
QUnit.test( 'Options are set', function( assert ) {
|
|
|
|
assert.strictEqual( marked.defaults.smartypants, true );
|
2016-12-08 09:41:55 +00:00
|
|
|
});
|
|
|
|
|
2018-01-22 14:35:15 +00:00
|
|
|
QUnit.test( 'Smart quotes are activated', function( assert ) {
|
2016-12-08 09:41:55 +00:00
|
|
|
var text = document.querySelector( '.reveal .slides>section>p' ).textContent;
|
|
|
|
|
2018-01-22 14:35:15 +00:00
|
|
|
assert.strictEqual( /['"]/.test( text ), false );
|
|
|
|
assert.strictEqual( /[“”‘’]/.test( text ), true );
|
2016-12-08 09:41:55 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
} );
|
|
|
|
|
|
|
|
Reveal.initialize({
|
|
|
|
dependencies: [
|
|
|
|
{ src: '../plugin/markdown/marked.js' },
|
2018-01-22 14:35:15 +00:00
|
|
|
// Test loading JS files with query strings
|
|
|
|
{ src: '../plugin/markdown/markdown.js?query=string' },
|
2016-12-08 09:41:55 +00:00
|
|
|
],
|
|
|
|
markdown: {
|
|
|
|
smartypants: true
|
|
|
|
}
|
|
|
|
});
|