/* Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v1/includes/object The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ assert = chai.assert; describe('includes', function() { var htmlFragment = "
\n HTML5 & CSS3 latest features in action! - \n David Rousset -\n \n \n
\n
\n Building High-Performing JavaScript for Modern Engines -\n John-David Dalton and \n Amanda Silver -\n \n \n
\n\n\n
\n

Build Conference

\n

\n Redmond, \n Washington, \n USA\n

\n
"; var expected = {"items":[{"type":["h-event"],"properties":{"start":["2012-10-30 11:45:00-08:00"],"name":["Build Conference"],"location":[{"value":"Redmond, \n Washington, \n USA","type":["h-adr"],"properties":{"locality":["Redmond"],"region":["Washington"],"country-name":["USA"]}}]}},{"type":["h-event"],"properties":{"start":["2012-10-31 11:15:00-08:00"],"name":["Build Conference"],"location":[{"value":"Redmond, \n Washington, \n USA","type":["h-adr"],"properties":{"locality":["Redmond"],"region":["Washington"],"country-name":["USA"]}}]}},{"type":["h-adr"],"properties":{"locality":["Redmond"],"region":["Washington"],"country-name":["USA"]}}],"rels":{},"rel-urls":{}}; it('object', 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); }); });