Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit add0151

Browse files
committed
require mapbox credentials into mapbox jasmine tests
1 parent 15616b0 commit add0151

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

tasks/util/shortcut_paths.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ var constants = require('./constants');
1111
var shortcutsConfig = {
1212
'@src': constants.pathToSrc,
1313
'@lib': constants.pathToLib,
14-
'@mocks': constants.pathToTestImageMocks
14+
'@mocks': constants.pathToTestImageMocks,
15+
'@build': constants.pathToBuild
1516
};
1617

1718
module.exports = transformTools.makeRequireTransform('requireTransform',

test/jasmine/tests/mapbox_test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ var customMatchers = require('../assets/custom_matchers');
1111

1212
var noop = function() {};
1313

14+
Plotly.setPlotConfig({
15+
mapboxAccessToken: require('@build/credentials.json').MAPBOX_ACCESS_TOKEN
16+
});
17+
1418

1519
describe('mapbox defaults', function() {
1620
'use strict';

test/jasmine/tests/scattermapbox_test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ var createGraphDiv = require('../assets/create_graph_div');
99
var destroyGraphDiv = require('../assets/destroy_graph_div');
1010
var customMatchers = require('../assets/custom_matchers');
1111

12+
Plotly.setPlotConfig({
13+
mapboxAccessToken: require('@build/credentials.json').MAPBOX_ACCESS_TOKEN
14+
});
15+
1216

1317
describe('scattermapbox defaults', function() {
1418
'use strict';

0 commit comments

Comments
 (0)