aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-05-03 22:01:34 +0100
committerMichael Williamson <mike@zwobble.org>2013-05-03 22:01:34 +0100
commit9f2a2399cdabf91d0766c9a6ddbeed0a4e2597cf (patch)
treeb94b0e78f88fb1b68a1045ca3b7dba8d1ad0ef1f /tests
parent4746d8f52c7287f9f71f393f6a5220130ed3d984 (diff)
Add parsing for styles
Diffstat (limited to 'tests')
-rw-r--r--tests/style-reader.tests.js13
1 files changed, 13 insertions, 0 deletions
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"])
+ }
+ );
+ });
+});