Skip to content

Commit 3042c13

Browse files
committed
stub out gl3d.plot in plot api test,
- so that tests can run on gl-less environments e.g. CircleCI.
1 parent 5f7293d commit 3042c13

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/jasmine/tests/plot_api_test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,12 @@ describe('Test plot api', function() {
711711
}
712712
}];
713713

714+
spyOn(Plots.subplotsRegistry.gl3d, 'plot');
715+
714716
Plotly.plot(gd, data);
715717

718+
expect(Plots.subplotsRegistry.gl3d.plot).toHaveBeenCalled();
719+
716720
var contours = gd.data[0].contours;
717721

718722
expect(contours.x.highlightColor).toBeUndefined();
@@ -736,8 +740,12 @@ describe('Test plot api', function() {
736740
type: 'surface'
737741
}];
738742

743+
spyOn(Plots.subplotsRegistry.gl3d, 'plot');
744+
739745
Plotly.plot(gd, data);
740746

747+
expect(Plots.subplotsRegistry.gl3d.plot).toHaveBeenCalled();
748+
741749
var contours = gd.data[0].contours;
742750

743751
expect(contours.x).toBeUndefined();

0 commit comments

Comments
 (0)