summaryrefslogtreecommitdiffstats
path: root/toolkit/components/microformats/test/interface-tests/experimental-test.js
blob: 4d32b83c0577427f6ae41e5430ee89b97824d00d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
Unit test for get
*/

assert = chai.assert;


describe('experimental', function() {

   it('h-geo - geo data writen as lat;lon', function(){

        var expected = {
				'items': [{
					'type': ['h-geo'],
					'properties': {
						'name': ['30.267991;-97.739568'],
						'latitude': [30.267991],
						'longitude': [-97.739568]
					}
				}],
				'rels': {},
				'rel-urls': {}
			},
			options = {
				'html': '<div class="h-geo">30.267991;-97.739568</div>',
				'baseUrl': 'http://example.com',
				'dateFormat': 'html5',
				'parseLatLonGeo': true
			};

        var result = Microformats.get(options);
        assert.deepEqual( result, expected );

   });


});