File tree Expand file tree Collapse file tree 3 files changed +5
-16
lines changed Expand file tree Collapse file tree 3 files changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -38,26 +38,21 @@ We use the following [labels](https://github.com/plotly/plotly.js/labels) to tra
38
38
39
39
#### Step 1: Clone the plotly.js repo and install its dependencies
40
40
41
- ```
41
+ ``` bash
42
42
git clone https://github.com/plotly/plotly.js.git
43
43
cd plotly.js
44
44
npm install
45
45
```
46
46
47
- #### Step 2: Setup Mapbox access token
48
-
49
- As of ` v1.13.0 ` , plotly.js includes a [ ` mapbox-gl ` ] ( https://github.com/mapbox/mapbox-gl-js ) integration. Creating ` mapbox-gl ` graphs requires an
50
- [ ` accessToken ` ] ( https://www.mapbox.com/help/define-access-token/ ) . To make sure
51
- that the plotly.js test suites and devtools work properly, locate your Mapbox access
52
- token and run:
47
+ #### Step 2: Setup test environment
53
48
54
49
``` bash
55
- export MAPBOX_ACCESS_TOKEN= " <your access token> " && npm run pretest
50
+ npm run pretest
56
51
```
57
52
58
53
#### Step 3: Start the test dashboard
59
54
60
- ```
55
+ ``` bash
61
56
npm start
62
57
```
63
58
Original file line number Diff line number Diff line change 1
1
var fs = require ( 'fs' ) ;
2
2
var constants = require ( './util/constants' ) ;
3
- var mapboxAccessToken = process . env . MAPBOX_ACCESS_TOKEN ;
4
3
5
4
6
- if ( ! mapboxAccessToken ) {
7
- throw new Error ( [
8
- 'MAPBOX_ACCESS_TOKEN not found!!!' ,
9
- 'Please export your mapbox access token into and try again.'
10
- ] . join ( '\n' ) ) ;
11
- }
12
5
13
6
// Create a credentials json file,
14
7
// to be required in jasmine test suites and test dashboard
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ module.exports = {
67
67
pathToJasmineTests : path . join ( pathToRoot , 'test/jasmine/tests' ) ,
68
68
pathToJasmineBundleTests : path . join ( pathToRoot , 'test/jasmine/bundle_tests' ) ,
69
69
70
+ mapboxAccessToken : 'pk.eyJ1IjoiZXRwaW5hcmQiLCJhIjoiY2luMHIzdHE0MGFxNXVubTRxczZ2YmUxaCJ9.hwWZful0U2CQxit4ItNsiQ' ,
70
71
pathToCredentials : path . join ( pathToBuild , 'credentials.json' ) ,
71
72
pathToSetPlotConfig : path . join ( pathToBuild , 'set_plot_config.js' ) ,
72
73
You can’t perform that action at this time.
0 commit comments