diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-04-22 13:45:13 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-04-22 13:45:13 +0100 |
| commit | 3985f63ba8451a06db149f059ca1845e398d1024 (patch) | |
| tree | ca51755c35788341b5ab04357706861736dcd014 /tests | |
| parent | 4423acf4ff5124585d5d2483bd0651fa5c29e083 (diff) | |
Remove list builder methods on document matchers
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/document-matchers.tests.js | 6 | ||||
| -rw-r--r-- | tests/style-reader.tests.js | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/document-matchers.tests.js b/tests/document-matchers.tests.js index 070e0bf..bb51c69 100644 --- a/tests/document-matchers.tests.js +++ b/tests/document-matchers.tests.js @@ -20,7 +20,7 @@ describe("document-matchers", function() { }); test("ordered-list(index) matches an ordered list with specified level index", function() { - var matcher = documentMatchers.paragraph().orderedList(1); + var matcher = documentMatchers.paragraph({list: {isOrdered: true, levelIndex: 1}}); assert.ok(!matcher.matches(new Paragraph())); assert.ok(matcher.matches(new Paragraph([], {numbering: {level: 1, isOrdered: true}}))); assert.ok(!matcher.matches(new Paragraph([], {numbering: {level: 0, isOrdered: true}}))); @@ -28,14 +28,14 @@ describe("document-matchers", function() { }); test("unordered-list(index) matches an unordered list with specified level index", function() { - var matcher = documentMatchers.paragraph().unorderedList(1); + var matcher = documentMatchers.paragraph({list: {isOrdered: false, levelIndex: 1}}); assert.ok(!matcher.matches(new Paragraph())); 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); + var matcher = documentMatchers.paragraph({list: {isOrdered: true, levelIndex: 0}}); assert.ok(!matcher.matches(new Paragraph())); }); }); diff --git a/tests/style-reader.tests.js b/tests/style-reader.tests.js index 50986e5..61ba28b 100644 --- a/tests/style-reader.tests.js +++ b/tests/style-reader.tests.js @@ -65,14 +65,14 @@ describe("styleReader.readDocumentMatcher", function() { test("reads p:ordered-list(1) as ordered list with index of 0", function() { assert.deepEqual( readDocumentMatcher("p:ordered-list(1)"), - documentMatchers.paragraph().orderedList(0) + documentMatchers.paragraph({list: {isOrdered: true, levelIndex: 0}}) ); }); test("reads p:unordered-list(1) as unordered list with index of 0", function() { assert.deepEqual( readDocumentMatcher("p:unordered-list(1)"), - documentMatchers.paragraph().unorderedList(0) + documentMatchers.paragraph({list: {isOrdered: false, levelIndex: 0}}) ); }); |
