From 8cf5cf90366a4f5f8e0efaf3bb39c0c4f8f512e0 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 4 May 2013 11:02:56 +0100 Subject: Fix list index 0 matching any paragraph --- tests/document-matchers.tests.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/document-matchers.tests.js b/tests/document-matchers.tests.js index eef463d..6d77926 100644 --- a/tests/document-matchers.tests.js +++ b/tests/document-matchers.tests.js @@ -33,6 +33,11 @@ describe("document-matchers", function() { assert.ok(matcher.matches(new Paragraph([], {numbering: {level: 1, isOrdered: false}}))); assert.ok(!matcher.matches(new Paragraph([], {numbering: {level: 1, isOrdered: true}}))); }); + + test("matchers for lists with index 0 do not match elements that are not lists", function() { + var matcher = documentMatchers.paragraph().orderedList(0); + assert.ok(!matcher.matches(new Paragraph())); + }); }); function paragraphWithStyle(styleName) { -- cgit v1.2.3