File tree 2 files changed +38
-0
lines changed
2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ /* global Plotly:false */
2
+
3
+ describe ( 'Test plotly.min.js' , function ( ) {
4
+ 'use strict' ;
5
+
6
+ // Note: this test doesn't have access to custom_matchers.js
7
+ // so you can only use standard jasmine matchers here.
8
+
9
+ it ( 'should expose Plotly global' , function ( ) {
10
+ expect ( window . Plotly ) . toBeDefined ( ) ;
11
+ } ) ;
12
+
13
+ it ( 'should be able to plot a mapbox plot' , function ( done ) {
14
+ var gd = document . createElement ( 'div' ) ;
15
+ document . body . appendChild ( gd ) ;
16
+
17
+ Plotly . plot ( gd , [ {
18
+ type : 'scattermapbox' ,
19
+ lon : [ 10 , 20 , 30 ] ,
20
+ lat : [ 10 , 30 , 20 ]
21
+ } ] , { } , {
22
+ mapboxAccessToken : 'pk.eyJ1IjoiZXRwaW5hcmQiLCJhIjoiY2luMHIzdHE0MGFxNXVubTRxczZ2YmUxaCJ9.hwWZful0U2CQxit4ItNsiQ'
23
+ } )
24
+ . catch ( function ( ) {
25
+ fail ( 'mapbox plot failed' ) ;
26
+ } )
27
+ . then ( function ( ) {
28
+ document . body . removeChild ( gd ) ;
29
+ done ( ) ;
30
+ } ) ;
31
+ } ) ;
32
+ } ) ;
Original file line number Diff line number Diff line change @@ -255,6 +255,12 @@ if(isFullSuite) {
255
255
] ;
256
256
delete func . defaultConfig . preprocessors [ pathToCustomMatchers ] ;
257
257
break ;
258
+ case 'minified_bundle' :
259
+ // browserified custom_matchers doesn't work with this route
260
+ // so clear them out of the files and preprocessors
261
+ func . defaultConfig . files = [ constants . pathToPlotlyDistMin ] ;
262
+ delete func . defaultConfig . preprocessors [ pathToCustomMatchers ] ;
263
+ break ;
258
264
case 'ie9' :
259
265
// load ie9_mock.js before plotly.js+test bundle
260
266
// to catch reference errors that could occur
You can’t perform that action at this time.
0 commit comments