Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test('MapGL call onLoad when provided', t => {
const reactContainer = document.createElement('div');
document.body.appendChild(reactContainer);
function onLoad(...args) {
t.equal(args.length, 0, 'onLoad does not expose the map object.');
t.end();
}
const props = {...defaultProps, onLoad};
ReactDOM.render(, reactContainer);
if (!MapGL.supported()) {
t.end();
}
});
() => {
if (!ReactMapGL.supported()) {
setIsSupported(false);
onMapError('WebGL not supported');
}
},
[],