Skip to content

Commit

Permalink
Fixed format
Browse files Browse the repository at this point in the history
  • Loading branch information
underoot committed Jan 15, 2024
1 parent 7e8c78a commit ee8436f
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions test/utils/setup.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
const MapboxDirections = require('../..');

module.exports = function setup(opts) {
const container = document.createElement('div');
mapboxgl.Map.prototype._detectMissingCSS = () => {};
const map = new mapboxgl.Map({
container: container,
style: {
version: 8,
sources: {},
glyphs: 'mapbox://fonts/mapbox/{fontstack}/{range}.pbf',
layers: [
{
id: 'background',
type: 'background',
paint: {
'background-color': '#fff'
}
}
]
const container = document.createElement('div');
mapboxgl.Map.prototype._detectMissingCSS = () => { };
const map = new mapboxgl.Map({
container: container,
style: {
version: 8,
sources: {},
glyphs: 'mapbox://fonts/mapbox/{fontstack}/{range}.pbf',
layers: [
{
id: 'background',
type: 'background',
paint: {
'background-color': '#fff'
}
}
});
]
}
});

const directions = new MapboxDirections({
accessToken: mapboxgl.accessToken,
...opts
});
map.addControl(directions);
const directions = new MapboxDirections({
accessToken: mapboxgl.accessToken,
...opts
});
map.addControl(directions);

return {
container,
map,
directions
};
return {
container,
map,
directions
};
}

0 comments on commit ee8436f

Please sign in to comment.