MCPcopy
hub / github.com/plotly/plotly.js / _assert

Function _assert

test/jasmine/tests/colorbar_test.js:460–474  ·  view source on GitHub ↗
(msg, exp)

Source from the content-addressed store, hash-verified

458 }
459
460 function _assert(msg, exp) {
461 var gd3 = d3Select(gd);
462 var cb0 = gd3.select('.cbtrace0');
463 var cb1 = gd3.select('.cbcoloraxis');
464
465 if(msg !== 'base') {
466 expect(subroutines.doColorBars).toHaveBeenCalledTimes(1);
467 expect(Plots.doCalcdata).toHaveBeenCalledTimes(0);
468 }
469 subroutines.doColorBars.calls.reset();
470 Plots.doCalcdata.calls.reset();
471
472 expect(getOutline(cb0)).toBe(exp.outline[0], 'trace0 cb outline');
473 expect(getOutline(cb1)).toBe(exp.outline[1], 'coloraxis cb outline');
474 }
475
476 Plotly.newPlot(gd, [{
477 type: 'heatmap',

Callers 1

colorbar_test.jsFile · 0.70

Calls 1

getOutlineFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…