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

Function _assert

test/jasmine/tests/select_test.js:1607–1620  ·  view source on GitHub ↗
(msg, exp)

Source from the content-addressed store, hash-verified

1605 fig.layout.hovermode = 'closest';
1606
1607 function _assert(msg, exp) {
1608 expect(gd.layout.xaxis.range)
1609 .toBeCloseToArray(exp.xrng, 2, 'xaxis range - ' + msg);
1610 expect(gd.layout.yaxis.range)
1611 .toBeCloseToArray(exp.yrng, 2, 'yaxis range - ' + msg);
1612
1613 if(exp.selpts === null) {
1614 expect('selectedpoints' in gd.data[0])
1615 .toBe(false, 'cleared selectedpoints - ' + msg);
1616 } else {
1617 expect(gd.data[0].selectedpoints)
1618 .toBeCloseToArray(exp.selpts, 2, 'selectedpoints - ' + msg);
1619 }
1620 }
1621
1622 _newPlot(gd, fig).then(function() {
1623 _assert('base', {

Callers 1

select_test.jsFile · 0.70

Calls 3

outline2coordsFunction · 0.85
assertSelectionNodesFunction · 0.85
assertPtOpacityFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…