summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2017-04-03 10:16:08 +0100
committerMichael Williamson <mike@zwobble.org>2017-04-03 10:16:08 +0100
commit284be64be74acd72df87fcda4b588a6d3ed59723 (patch)
tree8df556068d7958cf350dece1ddb0cb90c1333452
parentfb1bff7525abe780182d72ebd1b9653968236441 (diff)
Add test for default font value
-rw-r--r--test/docx/body-reader.tests.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/docx/body-reader.tests.js b/test/docx/body-reader.tests.js
index e66bd5e..c3d5556 100644
--- a/test/docx/body-reader.tests.js
+++ b/test/docx/body-reader.tests.js
@@ -453,6 +453,13 @@ test("run has vertical alignment read from properties", function() {
assert.deepEqual(run.verticalAlignment, documents.verticalAlignment.superscript);
});
+test("run has null font by default", function() {
+ var runXml = runWithProperties([]);
+
+ var run = readXmlElementValue(runXml);
+ assert.deepEqual(run.font, null);
+});
+
test("run has font read from properties", function() {
var fontXml = new XmlElement("w:rFonts", {"w:ascii": "Arial"});
var runXml = runWithProperties([fontXml]);