aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-07-07 20:49:22 +0100
committerMichael Williamson <mike@zwobble.org>2016-07-07 20:49:22 +0100
commitb0ff9fc6b25bbe74aaa7245d24a6476b4f5f1ec6 (patch)
treeaa60cc9d94eebbebedf6ba644eef359e9eb4e5f4 /test
parentbaf9808eae3441de70a00cd043e10e0ebf06b7c0 (diff)
Test that comments are ignored by default
Diffstat (limited to 'test')
-rw-r--r--test/document-to-html.tests.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/document-to-html.tests.js b/test/document-to-html.tests.js
index 0b4f905..a4678ec 100644
--- a/test/document-to-html.tests.js
+++ b/test/document-to-html.tests.js
@@ -486,6 +486,26 @@ describe('DocumentConverter', function() {
});
});
+ test('comments are ignored by default', function() {
+ var reference = documents.commentReference("4");
+ var comment = documents.comment({
+ commentId: "4",
+ body: [paragraphOfText("Who's there?")]
+ });
+ var document = documents.document([
+ documents.paragraph([
+ runOfText("Knock knock"),
+ documents.run([reference])
+ ])
+ ], {comments: [comment]});
+
+ var converter = new DocumentConverter({});
+ return converter.convertToHtml(document).then(function(result) {
+ assert.equal(result.value, '<p>Knock knock</p>');
+ });
+
+ });
+
test('images are written with data URIs', function() {
var imageBuffer = new Buffer("Not an image at all!");
var image = new documents.Image({