diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-04-18 20:12:51 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-04-18 20:12:51 +0100 |
| commit | f5e1cbb69b1aae679f8629fe13d0c49778b181d0 (patch) | |
| tree | 97e918bcec20cabb94f050a924578c0f2ea582d0 /tests/document-to-html.tests.js | |
| parent | 554e939ed6f3ce697fca925a333cb9fc14ccbe5a (diff) | |
Emit warnings if paragraph style is not recognised
Diffstat (limited to 'tests/document-to-html.tests.js')
| -rw-r--r-- | tests/document-to-html.tests.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/document-to-html.tests.js b/tests/document-to-html.tests.js index f1e6402..d63813d 100644 --- a/tests/document-to-html.tests.js +++ b/tests/document-to-html.tests.js @@ -85,6 +85,16 @@ describe('DocumentConverter', function() { }); }); + test('warning is emitted if style is unrecognised', function() { + var document = new documents.Document([ + paragraphOfText("Hello.", "Heading1"), + ]); + var converter = new DocumentConverter(); + return converter.convertToHtml(document).then(function(result) { + assert.deepEqual(result.messages, [results.warning("Unrecognised paragraph style: Heading1")]); + }); + }); + test('can use stacked styles to generate nested HTML elements', function() { var document = new documents.Document([ paragraphOfText("Hello.", "Heading1") |
