From 9a4da2889ceaaed5351e4bb50d9f1660c5e3ee27 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 20 May 2017 15:25:18 +0100 Subject: Move isTable and isRow into matchers module --- test/docx/document-matchers.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/docx/document-matchers.js') 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)); } -- cgit v1.2.3