diff --git a/test/data/bad/bad-polygonloop.result-object b/test/data/bad/bad-polygonloop.result-object index 8b42c27..bc4b61c 100644 --- a/test/data/bad/bad-polygonloop.result-object +++ b/test/data/bad/bad-polygonloop.result-object @@ -1081,5 +1081,8 @@ }, { "message": "a number was found where a coordinate array should have been found: this needs to be nested more deeply" + }, + { + "message": "Polygons and MultiPolygons should follow the right-hand rule" } -] \ No newline at end of file +] diff --git a/test/hint.test.js b/test/hint.test.js index 56c39f6..8b15414 100644 --- a/test/hint.test.js +++ b/test/hint.test.js @@ -35,17 +35,17 @@ test('geojsonhint', function(t) { }); t.end(); }); - // test('validates incorrect files as objects', function(t) { - // glob.sync('test/data/bad/*.geojson').forEach(function(f) { - // if (f === 'test/data/bad/bad-json.geojson') return; - // var gj = filejs(f); - // if (process.env.UPDATE) { - // fs.writeFileSync(f.replace('geojson', 'result-object'), JSON.stringify(geojsonhint.hint(gj), null, 2)); - // } - // t.deepEqual(geojsonhint.hint(gj), filejs(f.replace('geojson', 'result-object')), f); - // }); - // t.end(); - // }); + test('validates incorrect files as objects', function(t) { + glob.sync('test/data/bad/*.geojson').forEach(function(f) { + if (f === 'test/data/bad/bad-json.geojson') return; + var gj = filejs(f); + if (process.env.UPDATE) { + fs.writeFileSync(f.replace('geojson', 'result-object'), JSON.stringify(geojsonhint.hint(gj), null, 2)); + } + t.deepEqual(geojsonhint.hint(gj), filejs(f.replace('geojson', 'result-object')), f); + }); + t.end(); + }); test('noDuplicateMembers option=false', function(t) { t.deepEqual(geojsonhint.hint('{"type":"invalid","type":"Feature","properties":{},"geometry":null}', { noDuplicateMembers: false