aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-04-18 20:14:37 +0100
committerMichael Williamson <mike@zwobble.org>2013-04-18 20:14:37 +0100
commitb10fffa46bc53408d0dcce12db9cd3b27dba16cb (patch)
tree933af1079c30eed3120e3236527558451c2a2f6d /tests
parentf5e1cbb69b1aae679f8629fe13d0c49778b181d0 (diff)
Emit warning if run style is not recognised
Diffstat (limited to 'tests')
-rw-r--r--tests/document-to-html.tests.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/document-to-html.tests.js b/tests/document-to-html.tests.js
index d63813d..a01018a 100644
--- a/tests/document-to-html.tests.js
+++ b/tests/document-to-html.tests.js
@@ -85,7 +85,7 @@ describe('DocumentConverter', function() {
});
});
- test('warning is emitted if style is unrecognised', function() {
+ test('warning is emitted if paragraph style is unrecognised', function() {
var document = new documents.Document([
paragraphOfText("Hello.", "Heading1"),
]);
@@ -155,6 +155,14 @@ describe('DocumentConverter', function() {
});
});
+ test('warning is emitted if run style is unrecognised', function() {
+ var run = runOfText("Hello.", {styleName: "Emphasis"});
+ var converter = new DocumentConverter();
+ return converter.convertToHtml(run).then(function(result) {
+ assert.deepEqual(result.messages, [results.warning("Unrecognised run style: Emphasis")]);
+ });
+ });
+
test('docx hyperlink is converted to <a>', function() {
var hyperlink = new documents.Hyperlink(
[runOfText("Hello.")],