@mapbox/geojson-fixtures

1.0.0 • Public • Published

geojson-fixtures

Test fixtures of GeoJSON objects.

API

  • fixtures.geometry.*
  • fixtures.feature.*
  • fixtures.featurecollection.*
  • fixtures.all[]: all kinds of fixtures

Helper

Includes a test helper for writing fixture-based tests with substack/tape.

// first argument is require('tape') or a 't' test runner
// second is the type of fixtures: 'all', 'geometry', 'feature', 'featurecollection'
// third is the function to run to turn input into output: the tested function.
// fourth is the directory where test output should be stored.
// fifth is whether to enable geojsonhint as a last step. set to false to disable.
// sixth is a postcondition that can be any arbitrary test
geojsonFixtures(test, 'all', centroid, __dirname + '/test', true, function(t, input, output) {
    t.ok(input);
});

Install

npm install --save-dev geojson-fixtures

Package Sidebar

Install

npm i @mapbox/geojson-fixtures

Weekly Downloads

22

Version

1.0.0

License

ISC

Last publish

Collaborators

  • mbx-npm-ci-production
  • mbx-npm-ci-staging
  • mbx-npm-advanced-actions-production
  • mbx-npm-advanced-actions-staging
  • mbx-npm-09-production
  • mbx-npm-08-production
  • mbx-npm-07-production
  • mbx-npm-06-production
  • mbx-npm-05-production
  • mbx-npm-04-production
  • mbx-npm-03-production
  • mbx-npm-02-production
  • mbx-npm-01-production
  • mbx-npm-02-staging
  • mapbox-npm-01
  • mapbox-npm-02
  • mapbox-npm-07
  • mapbox-npm-03
  • mapbox-npm-04
  • mapbox-npm-09
  • mapbox-npm-05
  • mapbox-npm-06
  • mapbox-npm-08
  • mapbox-npm-advanced-actions
  • mapbox-npm-ci
  • mapbox-npm
  • mapbox-admin
  • mapbox-machine-user