forked from visgl/react-map-gl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmap-spec.js
34 lines (31 loc) · 912 Bytes
/
map-spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import MapGL from '../src';
import document from 'global/document';
/* global process */
import React from 'react';
import ReactDOM from 'react-dom';
import test from 'tape-catch';
/* eslint-disable no-process-env */
// This will get converted to a string by envify
const 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);
const map = (
<MapGL
width={ 500 }
height={ 500 }
longitude={ -122 }
latitude={ 37 }
zoom={ 14 }
mapboxApiAccessToken={ mapboxApiAccessToken }/>
);
const reactContainer = document.createElement('div');
document.body.appendChild(reactContainer);
ReactDOM.render(map, reactContainer);
t.ok(true);
t.end();
});
});
/* eslint-enable func-names */