node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



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');

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');
}, 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){
            return done(err);