Skip to content

Commit 02cb4e1

Browse files
committed
Create copy of mock
1 parent b533355 commit 02cb4e1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/jasmine/tests/range_slider_test.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var Plotly = require('@lib/index');
2+
var Lib = require('@src/lib');
23
var RangeSlider = require('@src/components/rangeslider');
34
var createGraphDiv = require('../assets/create_graph_div');
45
var destroyGraphDiv = require('../assets/destroy_graph_div');
@@ -16,7 +17,9 @@ describe('the range slider', function() {
1617
beforeEach(function(done) {
1718
gd = createGraphDiv();
1819

19-
Plotly.plot(gd, mock.data, mock.layout).then(function() {
20+
var mockCopy = Lib.extendDeep({}, mock);
21+
22+
Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() {
2023
rangeSlider = document.getElementsByClassName('range-slider')[0];
2124
children = rangeSlider.children;
2225
done();

0 commit comments

Comments
 (0)