Tests!
Healthy Code, Healthy Tests! Unfortunately there are no tests to be found anywhere in this repo, as it started out as a just a proof of concept but has turned into a full fledged project. At least one test on basic functionality is needed.
I would love to work on this. Can you assign this issue to me?
Running jest on the current project seems to be a bit tricky with mapbox-gl.
I was able to get the basic test working by creating a file __mocks__/mapbox-gl.js:
module.exports = {
GeolocateControl: jest.fn(),
Map: jest.fn(() => ({
addControl: jest.fn(),
on: jest.fn(),
remove: jest.fn()
})),
NavigationControl: jest.fn()
};
and running npm test.
While this requires a bit more work as it shows some problems in the code, I did not add this to #22.
I hope this helps a bit @murt202 and I am looking forward to some more tests.