aboutsummaryrefslogtreecommitdiff
path: root/test/docx/document-matchers.js
diff options
context:
space:
mode:
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));
}