(method, args, expectations)
| 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); |
no outgoing calls
no test coverage detected
searching dependent graphs…