diff options
| author | Michael Williamson <mike@zwobble.org> | 2024-06-13 12:02:46 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2024-06-13 12:02:46 +0100 |
| commit | 0546ccd76018d05a513fb1a1c4bb6bca42628dab (patch) | |
| tree | 13695a3e91d3491adb92b74ec681fec0176b8dee /test | |
| parent | 66c9ef99816708cb1ffedd3ec37e5622bf823c20 (diff) | |
Fix: matchers for specific break types match all break types
Diffstat (limited to 'test')
| -rw-r--r-- | test/document-to-html.tests.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/document-to-html.tests.js b/test/document-to-html.tests.js index 4587602..a18c4f5 100644 --- a/test/document-to-html.tests.js +++ b/test/document-to-html.tests.js @@ -655,12 +655,18 @@ test('breaks can be mapped using style mappings', function() { { from: documentMatchers.pageBreak, to: htmlPaths.topLevelElement("hr") + }, + { + from: documentMatchers.lineBreak, + to: htmlPaths.topLevelElement("br", {class: "line-break"}) } ] }); - return converter.convertToHtml(documents.pageBreak).then(function(result) { - assert.equal(result.value, "<hr />"); + var run = documents.run([documents.pageBreak, documents.lineBreak]); + + return converter.convertToHtml(run).then(function(result) { + assert.equal(result.value, '<hr /><br class="line-break" />'); }); }); |
