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

Function assertEventData

test/jasmine/tests/cartesian_interact_test.js:847–869  ·  view source on GitHub ↗
(msg, exp)

Source from the content-addressed store, hash-verified

845 }
846
847 function assertEventData(msg, exp) {
848 if(eventData === null) {
849 return fail('plotly_relayout did not get triggered - ' + msg);
850 }
851
852 exp.forEach(function(expi) {
853 var axNames = expi[0];
854 var rng = expi[1];
855 var opts = expi[2] || {};
856
857 axNames.forEach(function(n) {
858 var msgi = n + ' - ' + msg;
859 if(opts.autorange) {
860 expect(eventData[n + '.autorange']).toBe(true, 2, msgi + '|event data');
861 } else if(!opts.noChange && !opts.noEventData) {
862 expect(eventData[n + '.range[0]']).toBeCloseTo(rng[0], TOL, msgi + '|event data [0]');
863 expect(eventData[n + '.range[1]']).toBeCloseTo(rng[1], TOL, msgi + '|event data [1]');
864 }
865 });
866 });
867
868 eventData = null;
869 }
870
871 function assertAxesDrawCalls(msg, exp) {
872 var cnt = 0;

Callers 1

_assertFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…