From 841d7c1c60984c55bbc7e28461fd7d999b206154 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 14 Dec 2013 18:13:01 +0000 Subject: Remove redundant defaultParagraphStyle option --- tests/document-to-html.tests.js | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'tests/document-to-html.tests.js') diff --git a/tests/document-to-html.tests.js b/tests/document-to-html.tests.js index 51e1a73..dde395d 100644 --- a/tests/document-to-html.tests.js +++ b/tests/document-to-html.tests.js @@ -39,18 +39,6 @@ describe('DocumentConverter', function() { }); }); - test('can use non-default HTML element for unstyled paragraphs', function() { - var document = new documents.Document([ - paragraphOfText("Hello.") - ]); - var converter = new DocumentConverter({ - defaultParagraphStyle: htmlPaths.topLevelElement("h1") - }); - return converter.convertToHtml(document).then(function(result) { - assert.equal(result.value, "

Hello.

"); - }); - }); - test('text is HTML-escaped', function() { var document = new documents.Document([ paragraphOfText("1 < 2") @@ -89,6 +77,23 @@ describe('DocumentConverter', function() { }); }); + test('can use non-default HTML element for unstyled paragraphs', function() { + var document = new documents.Document([ + paragraphOfText("Hello.") + ]); + var converter = new DocumentConverter({ + styleMap: [ + { + from: documentMatchers.paragraph(), + to: htmlPaths.topLevelElement("h1") + } + ] + }); + return converter.convertToHtml(document).then(function(result) { + assert.equal(result.value, "

Hello.

"); + }); + }); + test('warning is emitted if paragraph style is unrecognised', function() { var document = new documents.Document([ paragraphOfText("Hello.", "Heading1"), -- cgit v1.2.3