thin wrapper around geojsonhint to allows you to easily use it to assertion test.
test object taken from chai, test data taken from geojsonhint.
install with npm
npm install geojson-assert
general usage
var assert = require('geojson-assert'); assert(geojson);
geojson-assert is somewhat less picky then geojsonhint and you can give it a str or an object.
If you pass true to the second argument it assumes you are passing a dict where values are valid geojson.
var assert = require('geojson-assert'); assert({ thing1:geojson, thing2:moreGeoJson }, true);
using it async in mocha
var assert = require('geojson-assert'); it('should work',function(done){ fs.readFile('path to json',{encoding:'utf8'},function(err,result){ if(err){ return done(err); } done(assert(result)); }); });
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4