aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-05-04 11:02:56 +0100
committerMichael Williamson <mike@zwobble.org>2013-05-04 11:02:56 +0100
commit8cf5cf90366a4f5f8e0efaf3bb39c0c4f8f512e0 (patch)
tree7e8e2e9825ea0758315b6628e37c36b147a0cdb2 /tests
parent2fb0cb2820dee31b4e48937586f7f98c7ec8aa61 (diff)
Fix list index 0 matching any paragraph
Diffstat (limited to 'tests')
-rw-r--r--tests/document-matchers.tests.js5
1 files changed, 5 insertions, 0 deletions
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) {