mirror of
https://github.com/visgl/react-map-gl.git
synced 2026-01-18 15:54:22 +00:00
32 lines
807 B
JavaScript
32 lines
807 B
JavaScript
'use strict';
|
|
|
|
var document = require('global/document');
|
|
var test = require('prova');
|
|
var MapGL = require('../src/index');
|
|
var React = require('react');
|
|
var r = require('r-dom');
|
|
var process = require('global/process');
|
|
/* eslint-disable no-process-env */
|
|
// This will get converted to a string by envify
|
|
var mapboxApiAccessToken = process.env.MapboxAccessToken;
|
|
/* eslint-enable no-process-env */
|
|
|
|
/* eslint-disable func-names, no-shadow */
|
|
test('MapGL', function(t) {
|
|
t.test('Exists', function(t) {
|
|
t.ok(MapGL);
|
|
var map = r(MapGL, {
|
|
width: 500,
|
|
height: 500,
|
|
longitude: -122,
|
|
latitude: 37,
|
|
zoom: 14,
|
|
mapboxApiAccessToken: mapboxApiAccessToken
|
|
});
|
|
React.render(map, document.body);
|
|
t.ok(true);
|
|
t.end();
|
|
});
|
|
});
|
|
/* eslint-enable func-names */
|