From 3b13af8c30ea45149b900faebc2a439e9a2be84e Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 4 May 2013 16:17:21 +0100 Subject: Parse choice operator in HTML paths --- tests/style-reader.tests.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') 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"])); }); -- cgit v1.2.3