aboutsummaryrefslogtreecommitdiff
path: root/test/docx
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2017-07-21 12:05:29 +0100
committerGitHub <noreply@github.com>2017-07-21 12:05:29 +0100
commit2107916e9f5ac9288f69f09048cb992ec7ab92b4 (patch)
tree40b6f218fbbac7782effb8b0ab1255b3e773a315 /test/docx
parent534f62e0684af52766adf82b8fd5dbf796e018db (diff)
parent33f089bb9f1d8fa599fe10ba1ddead6c10dbd4b4 (diff)
Merge pull request #124 from vgmoose/master
Add style mapping for small caps
Diffstat (limited to 'test/docx')
-rw-r--r--test/docx/body-reader.tests.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/docx/body-reader.tests.js b/test/docx/body-reader.tests.js
index 5257530..f84f0e8 100644
--- a/test/docx/body-reader.tests.js
+++ b/test/docx/body-reader.tests.js
@@ -431,11 +431,25 @@ test("isItalic is true if bold element is present", function() {
assert.equal(run.isItalic, true);
});
+test("isSmallCaps is false if smallcaps element is not present", function() {
+ var runXml = runWithProperties([]);
+ var run = readXmlElementValue(runXml);
+ assert.deepEqual(run.isSmallCaps, false);
+});
+
+test("isSmallCaps is true if smallcaps element is present", function() {
+ var smallCapsXml = new XmlElement("w:smallCaps");
+ var runXml = runWithProperties([smallCapsXml]);
+ var run = readXmlElementValue(runXml);
+ assert.equal(run.isSmallCaps, true);
+});
+
var booleanRunProperties = [
{name: "isBold", tagName: "w:b"},
{name: "isUnderline", tagName: "w:u"},
{name: "isItalic", tagName: "w:i"},
{name: "isStrikethrough", tagName: "w:strike"},
+ {name: "isSmallCaps", tagName: "w:smallCaps"},
];
booleanRunProperties.forEach(function(runProperty) {