From edab9c72e7c3e26d479457c844a354e98045f130 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 19 Feb 2017 19:15:20 +0000 Subject: Use extracted matchers in additional test case --- test/docx/body-reader.tests.js | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/test/docx/body-reader.tests.js b/test/docx/body-reader.tests.js index a7633a8..1541ce9 100644 --- a/test/docx/body-reader.tests.js +++ b/test/docx/body-reader.tests.js @@ -297,32 +297,13 @@ test("complex fields", (function() { assertThat(paragraph.children, contains( isEmptyRun, - isRun({ - children: contains( - isHyperlink({ - href: uri, - children: [] - }) - ) - }), - isRun({ - children: contains( - isHyperlink({ - href: uri, - children: contains( - isText("this is a hyperlink") - ) - }) - ) - }), - isRun({ + isEmptyHyperlinkedRun, + isHyperlinkedRun({ children: contains( - isHyperlink({ - href: uri, - children: [] - }) + isText("this is a hyperlink") ) }), + isEmptyHyperlinkedRun, isEmptyRun, isEmptyRun )); -- cgit v1.2.3