Add tests for classes-to-props
1 file changed, 9 insertions(+), 0 deletions(-)
M test/microformats/parser_test.clj → test/microformats/parser_test.clj
@@ -8,6 +8,15 @@ (testing "Empty HTML document should return an empty 'items' array and 'rels' hash." (is (= {:items [] :rels {}} (parse ""))))) +(deftest classes-to-props-property-names + (testing "`classes-to-props' should return property name without prefix" + (are [ex in] (= ex (into [] ((classes-to-props "p-") in))) + [:location] + ["someclass" "p-location" "someotherclass"] + + [:location :name] + ["someclass" "p-location" "someotherclass" "p-name"]))) + (deftest parse-p-inner-text (testing "Inner text of a p- property should be parsed") (are [ex in] (= ex (parse-p (first (html-snippet in))))