First commit

This commit is contained in:
Thomas Fuhrmann 2023-10-02 15:04:02 +02:00
commit 87d22a4516
235 changed files with 51802 additions and 0 deletions

14
test/index.test.js Normal file
View file

@ -0,0 +1,14 @@
/* eslint-env mocha */
const chai = require('chai')
const expect = chai.expect
describe('index', function () {
it('should export required properties and functions', () => {
const provider = require('../src/index')
expect(provider.type).to.equal('provider')
expect(provider.name).to.equal('koop-cli-new-provider')
expect(provider.Model).to.be.a('function')
})
})

19
test/model.test.js Normal file
View file

@ -0,0 +1,19 @@
/* eslint-env mocha */
const chai = require('chai')
const expect = chai.expect
describe('model', function () {
it('should get a geojson from the getData() function', (done) => {
const Model = require('../src/model')
const model = new Model()
model.getData({}, (err, geojson) => {
expect(err).to.equal(null)
expect(geojson.type).to.equal('FeatureCollection')
expect(geojson.features).to.be.an('array')
done()
})
})
})