MCPcopy Index your code
hub / github.com/plotly/plotly.js / _base

Function _base

test/jasmine/tests/plot_api_test.js:2324–2352  ·  view source on GitHub ↗
(method, args, expectations)

Source from the content-addressed store, hash-verified

2322
2323 describe('should extend/prepend and window traces with update keys linked', function () {
2324 function _base(method, args, expectations) {
2325 gd.data = [
2326 {
2327 x: [1, 2, 3]
2328 },
2329 {
2330 x: new Float32Array([1, 2, 3])
2331 }
2332 ];
2333
2334 Plotly[method](
2335 gd,
2336 {
2337 x: [args.newPts, new Float32Array(args.newPts)]
2338 },
2339 [0, 1],
2340 args.maxp
2341 );
2342
2343 expect(plotApi.redraw).toHaveBeenCalled();
2344 expect(Queue.add).toHaveBeenCalled();
2345
2346 expect(gd.data[0].x).toEqual(expectations.newArray);
2347 expect(gd.data[1].x).toEqual(new Float32Array(expectations.newArray));
2348
2349 var cont = Queue.add.calls.first().args[2][1].x;
2350 expect(cont[0]).toEqual(expectations.remainder);
2351 expect(cont[1]).toEqual(new Float32Array(expectations.remainder));
2352 }
2353
2354 function _extendTraces(args, expectations) {
2355 return _base('extendTraces', args, expectations);

Callers 2

_extendTracesFunction · 0.85
_prependTracesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…