aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-05-04 16:17:21 +0100
committerMichael Williamson <mike@zwobble.org>2013-05-04 16:17:21 +0100
commit3b13af8c30ea45149b900faebc2a439e9a2be84e (patch)
tree448cde8049e5ad85f5482cb6e89fa8b23d44367d /tests
parentefca7fab18dfc9d6cc384bd133ecb57016784260 (diff)
Parse choice operator in HTML paths
Diffstat (limited to 'tests')
-rw-r--r--tests/style-reader.tests.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/style-reader.tests.js b/tests/style-reader.tests.js
index 12dafca..114c28d 100644
--- a/tests/style-reader.tests.js
+++ b/tests/style-reader.tests.js
@@ -15,6 +15,15 @@ describe('styleReader.readHtmlPath', function() {
assert.deepEqual(readHtmlPath("p"), htmlPaths.elements(["p"]));
});
+ test('reads choice of elements', function() {
+ assert.deepEqual(
+ readHtmlPath("ul|ol"),
+ htmlPaths.elements([
+ htmlPaths.element(["ul", "ol"])
+ ])
+ );
+ });
+
test('reads nested elements', function() {
assert.deepEqual(readHtmlPath("ul > li"), htmlPaths.elements(["ul", "li"]));
});