From 9f2a2399cdabf91d0766c9a6ddbeed0a4e2597cf Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 3 May 2013 22:01:34 +0100 Subject: Add parsing for styles --- tests/style-reader.tests.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') diff --git a/tests/style-reader.tests.js b/tests/style-reader.tests.js index c9bfe5b..d406f48 100644 --- a/tests/style-reader.tests.js +++ b/tests/style-reader.tests.js @@ -7,6 +7,7 @@ var test = require("./testing").test; var readHtmlPath = styleReader.readHtmlPath; var readDocumentMatcher = styleReader.readDocumentMatcher; +var readStyle = styleReader.readStyle; describe('styleReader.readHtmlPath', function() { @@ -59,3 +60,15 @@ describe("styleReader.readDocumentMatcher", function() { ); }); }); + +describe("styleReader.read", function() { + test("document matcher is mapped to HTML path using arrow", function() { + assert.deepEqual( + readStyle("p => h1"), + { + from: documentMatchers.paragraph(), + to: htmlPaths.elements(["h1"]) + } + ); + }); +}); -- cgit v1.2.3