Skip to content

Commit 82062d6

Browse files
committed
test array relayout quickfix
1 parent 442e3b1 commit 82062d6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/jasmine/tests/plot_api_test.js

+15
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,21 @@ describe('Test plot api', function() {
148148
})
149149
.then(done);
150150
});
151+
152+
it('can set items in array objects', function(done) {
153+
Plotly.plot(gd, [{ x: [1, 2, 3], y: [1, 2, 3] }])
154+
.then(function() {
155+
return Plotly.relayout(gd, {rando: [1, 2, 3]});
156+
})
157+
.then(function() {
158+
expect(gd.layout.rando).toEqual([1, 2, 3]);
159+
return Plotly.relayout(gd, {'rando[1]': 45});
160+
})
161+
.then(function() {
162+
expect(gd.layout.rando).toEqual([1, 45, 3]);
163+
})
164+
.then(done);
165+
});
151166
});
152167

153168
describe('Plotly.restyle', function() {

0 commit comments

Comments
 (0)