diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-11-19 12:16:34 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-11-19 12:16:34 +0000 |
| commit | 2df392487052d543fe412383ef6d29886678edbf (patch) | |
| tree | 427c93ee2128c546076c32a9814efa094bde8968 /test | |
| parent | f3676789408dfaf898823c1fbe3cb7d6888a1fd4 (diff) | |
Support parsing style name prefixes
Diffstat (limited to 'test')
| -rw-r--r-- | test/style-reader.tests.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/style-reader.tests.js b/test/style-reader.tests.js index 85b85f1..6092bb9 100644 --- a/test/style-reader.tests.js +++ b/test/style-reader.tests.js @@ -96,13 +96,20 @@ test("styleReader.readDocumentMatcher", { ); }, - "reads paragraph with style name": function() { + "reads paragraph with exact style name": function() { assertDocumentMatcher( "p[style-name='Heading 1']", documentMatchers.paragraph({styleName: documentMatchers.equalTo("Heading 1")}) ); }, + "reads paragraph with style name prefix": function() { + assertDocumentMatcher( + "p[style-name^='Heading']", + documentMatchers.paragraph({styleName: documentMatchers.startsWith("Heading")}) + ); + }, + "reads p:ordered-list(1) as ordered list with index of 0": function() { assertDocumentMatcher( "p:ordered-list(1)", |
