aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/document-to-html.tests.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/document-to-html.tests.js b/test/document-to-html.tests.js
index a55f9a2..bf6631f 100644
--- a/test/document-to-html.tests.js
+++ b/test/document-to-html.tests.js
@@ -343,6 +343,17 @@ test('docx hyperlink with anchor is converted to <a>', function() {
});
});
+test('hyperlink target frame is used as anchor target', function() {
+ var hyperlink = new documents.Hyperlink(
+ [runOfText("Hello.")],
+ {anchor: "start", targetFrame: "_blank"}
+ );
+ var converter = new DocumentConverter();
+ return converter.convertToHtml(hyperlink).then(function(result) {
+ assert.equal(result.value, '<a href="#start" target="_blank">Hello.</a>');
+ });
+});
+
test('bookmarks are converted to anchors', function() {
var bookmarkStart = new documents.BookmarkStart({name: "_Peter"});
var converter = new DocumentConverter({