Skip to content

Commit

Permalink
update tests to always resolve relative URLs
Browse files Browse the repository at this point in the history
updates tests to match microformats/microformats2-parsing#10 by fixing
one broken test in v1/hcard/email, and adding a new test in
v2/hcard-relativeurlsempty that will pass only with the new parsing
rules implemented.
  • Loading branch information
willnorris committed Aug 26, 2018
1 parent 8d6a658 commit 5024fa2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/microformats-v1/hcard/email.json
Expand Up @@ -3,9 +3,9 @@
"type": ["h-card"],
"properties": {
"name": ["John Doe"],
"email": ["mailto:john@example.com", "john@example.com", "mailto:john@example.com?subject=parser-test", "john@example.com"]
"email": ["mailto:john@example.com", "http://example.com/john@example.com", "mailto:john@example.com?subject=parser-test", "http://example.com/john@example.com"]
}
}],
"rels": {},
"rel-urls": {}
}
}
7 changes: 5 additions & 2 deletions tests/microformats-v2/h-card/relativeurlsempty.html
@@ -1,4 +1,7 @@
<base href="http://example.com/profile">
<div class="h-card">
<a class="p-name u-url u-uid" href="">Max Mustermann</a>
</div>
<a class="p-name u-url" href="">Max Mustermann</a>

<!-- no value attribute, so get text content -->
<data class="u-uid">
</div>

0 comments on commit 5024fa2

Please sign in to comment.