From 0546ccd76018d05a513fb1a1c4bb6bca42628dab Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 13 Jun 2024 12:02:46 +0100 Subject: Fix: matchers for specific break types match all break types --- test/document-to-html.tests.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test/document-to-html.tests.js') 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, "
"); + var run = documents.run([documents.pageBreak, documents.lineBreak]); + + return converter.convertToHtml(run).then(function(result) { + assert.equal(result.value, '

'); }); }); -- cgit v1.2.3