tethys-feature-service/test/model.test.js
2023-10-02 15:04:02 +02:00

20 lines
465 B
JavaScript

/* 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()
})
})
})