/* Microformats Test Suite - Downloaded from github repo: microformats/tests version v0.1.24 Mocha integration test from: microformats-v2/h-recipe/all The test was built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST) */ assert = chai.assert; describe('h-recipe', function() { var htmlFragment = "
\n

Yorkshire Puddings

\n

Makes 6 good sized Yorkshire puddings, the way my mum taught me

\n\n\n

\n\n \n \n 4.5 stars out 5 based on \n 35 reviews\n \n \n\n
\n

Ingredients

\n \n
\n\n

Time

\n \n\n\n

Instructions

\n
\n
    \n
  1. Pre-heat oven to 230C or gas mark 8. Pour the vegetable oil evenly into 2 x 4-hole \n Yorkshire pudding tins and place in the oven to heat through.
  2. \n \n
  3. To make the batter, add all the flour into a bowl and beat in the eggs until smooth. \n Gradually add the milk and water while beating the mixture. It should be smooth and \n without lumps. Finally add a pinch of salt.
  4. \n \n
  5. Make sure the oil is piping hot before pouring the batter evenly into the tins. \n Place in the oven for 20-25 minutes until pudding have risen and look golden brown
  6. \n
\n
\n\n

Nutrition

\n \n

(Amount per pudding)

\n\n

\n Published on by \n \n Glenn Jones\n \n

\n Photo by dithie\n
"; var expected = {"items":[{"type":["h-recipe"],"properties":{"name":["Yorkshire Puddings"],"summary":["Makes 6 good sized Yorkshire puddings, the way my mum taught me"],"yield":["6 good sized Yorkshire puddings"],"photo":["http://codebits.glennjones.net/semantic/yorkshire-puddings.jpg"],"review":[{"value":"4.5 stars out 5 based on \n 35 reviews","type":["h-review-aggregate"],"properties":{"rating":["4.5 stars out 5 based on"],"average":["4.5"],"count":["35"],"name":["4.5 stars out 5 based on \n 35 reviews"]}}],"ingredient":[{"value":"1 egg","html":"1 egg"},{"value":"75g plain flour","html":"75g plain flour"},{"value":"70ml milk","html":"70ml milk"},{"value":"60ml water","html":"60ml water"},{"value":"Pinch of salt","html":"Pinch of salt"}],"instructions":[{"value":"Pre-heat oven to 230C or gas mark 8. Pour the vegetable oil evenly into 2 x 4-hole \n Yorkshire pudding tins and place in the oven to heat through. \n \n To make the batter, add all the flour into a bowl and beat in the eggs until smooth. \n Gradually add the milk and water while beating the mixture. It should be smooth and \n without lumps. Finally add a pinch of salt.\n \n Make sure the oil is piping hot before pouring the batter evenly into the tins. \n Place in the oven for 20-25 minutes until pudding have risen and look golden brown","html":"\n
    \n
  1. Pre-heat oven to 230C or gas mark 8. Pour the vegetable oil evenly into 2 x 4-hole \n Yorkshire pudding tins and place in the oven to heat through.
  2. \n \n
  3. To make the batter, add all the flour into a bowl and beat in the eggs until smooth. \n Gradually add the milk and water while beating the mixture. It should be smooth and \n without lumps. Finally add a pinch of salt.
  4. \n \n
  5. Make sure the oil is piping hot before pouring the batter evenly into the tins. \n Place in the oven for 20-25 minutes until pudding have risen and look golden brown
  6. \n
\n "}],"nutrition":["Calories: 125","Fat: 3.2g","Cholesterol: 77mg"],"published":["2011-10-27"],"author":[{"value":"Glenn Jones","type":["h-card"],"properties":{"name":["Glenn Jones"],"url":["http://glennjones.net"]}}],"url":["http://www.flickr.com/photos/dithie/4106528495/"]}}],"rels":{},"rel-urls":{}}; it('all', 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); }); });