Skip to content

Commit 89b56b7

Browse files
committed
Explicitly test passing object as customdata
1 parent cdfbfa5 commit 89b56b7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/jasmine/tests/calcdata_test.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -866,15 +866,14 @@ describe('calculated data and points', function() {
866866
describe('customdata', function() {
867867
it('should pass customdata to the calcdata points', function() {
868868
Plotly.plot(gd, [{
869-
x: [0, 1, 2, 3],
870-
y: [4, 5, 6, 7],
871-
customdata: ['a', 'b', 'c', 'd']
869+
x: [0, 1, 3],
870+
y: [4, 5, 7],
871+
customdata: ['a', 'b', {foo: 'bar'}]
872872
}], {});
873873

874874
expect(gd.calcdata[0][0]).toEqual(jasmine.objectContaining({data: 'a'}));
875875
expect(gd.calcdata[0][1]).toEqual(jasmine.objectContaining({data: 'b'}));
876-
expect(gd.calcdata[0][2]).toEqual(jasmine.objectContaining({data: 'c'}));
877-
expect(gd.calcdata[0][3]).toEqual(jasmine.objectContaining({data: 'd'}));
876+
expect(gd.calcdata[0][2]).toEqual(jasmine.objectContaining({data: {foo: 'bar'}}));
878877
});
879878
});
880879
});

0 commit comments

Comments
 (0)