Skip to content

Commit 34cf22e

Browse files
committed
fixup: copy mock before mutating it
1 parent 5101174 commit 34cf22e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/jasmine/tests/mapbox_test.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,10 @@ describe('mapbox plots', function() {
295295
}).then(function() {
296296
expect(countVisibleTraces(gd, modes)).toEqual(2);
297297

298-
mock.data[0].visible = false;
298+
var mockCopy = Lib.extendDeep({}, mock);
299+
mockCopy.data[0].visible = false;
299300

300-
return Plotly.newPlot(gd, mock.data, mock.layout);
301+
return Plotly.newPlot(gd, mockCopy.data, mockCopy.layout);
301302
}).then(function() {
302303
expect(countVisibleTraces(gd, modes)).toEqual(1);
303304

0 commit comments

Comments
 (0)