Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa18648 commit ecd795aCopy full SHA for ecd795a
test/jasmine/tests/plot_api_test.js
@@ -474,7 +474,21 @@ describe('Test plot api', function() {
474
expect(gd.data[2].uid).toBeDefined();
475
expect(PlotlyInternal.redraw).not.toHaveBeenCalled();
476
expect(PlotlyInternal.moveTraces).toHaveBeenCalledWith(gd, [-1], [0]);
477
+ });
478
+
479
+ it('should work when adding an existing trace', function() {
480
+ Plotly.addTraces(gd, gd.data[0]);
481
482
+ expect(gd.data.length).toEqual(3);
483
+ expect(gd.data[0]).not.toBe(gd.data[2]);
484
485
486
+ it('should work when duplicating the existing data', function() {
487
+ Plotly.addTraces(gd, gd.data);
488
489
+ expect(gd.data.length).toEqual(4)
490
491
+ expect(gd.data[1]).not.toBe(gd.data[3]);
492
});
493
494
0 commit comments