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