diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-04-22 19:00:30 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-04-22 19:00:30 +0100 |
| commit | ed8fdc9e31d6c60529bf6c8c6bd1bd81b1ca6153 (patch) | |
| tree | 1c5b26c2587f1a58a41b695739bf5b5a11ce72b1 /tests | |
| parent | 782417f12f2fcfb157760c5ce6d435aac1f3fd62 (diff) | |
Show style name when emitting unknown run style warning
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/document-to-html.tests.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/document-to-html.tests.js b/tests/document-to-html.tests.js index dc70b58..b6e3254 100644 --- a/tests/document-to-html.tests.js +++ b/tests/document-to-html.tests.js @@ -156,11 +156,11 @@ describe('DocumentConverter', function() { }); test('run styles are converted to HTML if mapping exists', function() { - var run = runOfText("Hello.", {styleId: "Emphasis"}); + var run = runOfText("Hello.", {styleId: "Heading1Char", styleName: "Heading 1 Char"}); var converter = new DocumentConverter({ styleMap: [ { - from: documentMatchers.run("Emphasis"), + from: documentMatchers.run({styleName: "Heading 1 Char"}), to: htmlPaths.elements(["strong"]) } ] @@ -171,10 +171,10 @@ describe('DocumentConverter', function() { }); test('warning is emitted if run style is unrecognised', function() { - var run = runOfText("Hello.", {styleId: "Emphasis"}); + var run = runOfText("Hello.", {styleId: "Heading1Char", styleName: "Heading 1 Char"}); var converter = new DocumentConverter(); return converter.convertToHtml(run).then(function(result) { - assert.deepEqual(result.messages, [results.warning("Unrecognised run style: Emphasis")]); + assert.deepEqual(result.messages, [results.warning("Unrecognised run style: 'Heading 1 Char'")]); }); }); |
