{"size": 1848, "ext": "js", "max_stars_repo_path": "test/standards-tests/mf-v2-h-card-p-property.js", "max_stars_repo_name": "sknebel/microformat-shiv", "max_stars_repo_stars_event_min_datetime": "2015-01-01T12:16:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-16T12:49:46.000Z", "max_issues_repo_path": "test/standards-tests/mf-v2-h-card-p-property.js", "max_issues_repo_name": "sknebel/microformat-shiv", "max_issues_repo_issues_event_min_datetime": "2015-08-08T08:59:41.000Z", "max_issues_repo_issues_event_max_datetime": "2019-10-22T15:25:46.000Z", "max_forks_repo_path": "test/standards-tests/mf-v2-h-card-p-property.js", "max_forks_repo_name": "sknebel/microformat-shiv", "max_forks_repo_forks_event_min_datetime": "2015-02-28T00:57:13.000Z", "max_forks_repo_forks_event_max_datetime": "2019-10-22T03:55:42.000Z"}
{"max_stars_count": 54, "max_issues_count": 20, "max_forks_count": 14, "avg_line_length": 66.0, "max_line_length": 878, "alphanum_fraction": 0.571969697}
/*
Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.26 
Mocha integration test from: microformats-v2/h-card/p-property
The test was built on Wed May 25 2016 10:23:15 GMT+0100 (BST)
*/

assert = chai.assert;


describe('h-card', function() {
   var htmlFragment = "<div class=\"h-card\">\n    \n    <span class=\"p-name\">\n        <span class=\"p-given-name value\">John</span> \n        <abbr class=\"p-additional-name\" title=\"Peter\">P</abbr>  \n        <span class=\"p-family-name value \">Doe</span> \n    </span>\n    <data class=\"p-honorific-suffix\" value=\"MSc\"></data>\n    \n    \n    <br class=\"p-honorific-suffix\" />BSc<br />\n    <hr class=\"p-honorific-suffix\" />BA\n    \n    \n    <img class=\"p-honorific-suffix\" src=\"images/logo.gif\" alt=\"PHD\" />\n    <img src=\"images/logo.gif\" alt=\"company logos\" usemap=\"#logomap\" />\n    <map name=\"logomap\">\n        <area class=\"p-org\" shape=\"rect\" coords=\"0,0,82,126\" href=\"madgex.htm\" alt=\"Madgex\" />\n        <area class=\"p-org\" shape=\"circle\" coords=\"90,58,3\" href=\"mozilla.htm\" alt=\"Mozilla\" />\n    </map>\n</div>";
   var expected = {"items":[{"type":["h-card"],"properties":{"name":["JohnDoe"],"given-name":["John"],"additional-name":["Peter"],"family-name":["Doe"],"honorific-suffix":["MSc","PHD"],"org":["Madgex","Mozilla"]}}],"rels":{},"rel-urls":{}};

   it('p-property', function(){
       var doc, dom, node, options, parser, found;
       dom = new DOMParser();
       doc = dom.parseFromString( htmlFragment, 'text/html' );
       options ={
       		'document': doc,
       		'node': doc,
       		'baseUrl': 'http://example.com',
       		'dateFormat': 'html5'
       };
       found = Microformats.get( options );
       assert.deepEqual(found, expected);
   });
});
