aboutsummaryrefslogtreecommitdiff
path: root/test/docx/document-matchers.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2017-05-20 15:25:18 +0100
committerMichael Williamson <mike@zwobble.org>2017-05-20 15:25:18 +0100
commit9a4da2889ceaaed5351e4bb50d9f1660c5e3ee27 (patch)
tree4fcc18bad50b14751d0fb162879f6cd92d200635 /test/docx/document-matchers.js
parent76dbec2efb57f87118069427158c15f7bb59c82d (diff)
Move isTable and isRow into matchers module
Diffstat (limited to 'test/docx/document-matchers.js')
-rw-r--r--test/docx/document-matchers.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/docx/document-matchers.js b/test/docx/document-matchers.js
index b750bed..83c4486 100644
--- a/test/docx/document-matchers.js
+++ b/test/docx/document-matchers.js
@@ -8,6 +8,8 @@ exports.isEmptyRun = isRun({children: []});
exports.isRun = isRun;
exports.isText = isText;
exports.isHyperlink = isHyperlink;
+exports.isTable = isTable;
+exports.isRow = isRow;
function isRun(properties) {
@@ -22,6 +24,14 @@ function isHyperlink(properties) {
return isDocumentElement(documents.types.hyperlink, properties);
}
+function isTable(options) {
+ return isDocumentElement(documents.types.table, options);
+}
+
+function isRow(options) {
+ return isDocumentElement(documents.types.tableRow, options);
+}
+
function isDocumentElement(type, properties) {
return hamjest.hasProperties(_.extend({type: hamjest.equalTo(type)}, properties));
}