diff options
Diffstat (limited to 'toolkit/components/microformats/test/interface-tests/experimental-test.js')
-rw-r--r-- | toolkit/components/microformats/test/interface-tests/experimental-test.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/toolkit/components/microformats/test/interface-tests/experimental-test.js b/toolkit/components/microformats/test/interface-tests/experimental-test.js new file mode 100644 index 000000000..4d32b83c0 --- /dev/null +++ b/toolkit/components/microformats/test/interface-tests/experimental-test.js @@ -0,0 +1,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 ); + + }); + + +}); |