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

Function _assert

test/jasmine/tests/colorscale_test.js:754–767  ·  view source on GitHub ↗
(msg, exp)

Source from the content-addressed store, hash-verified

752
753 it('should be able to toggle between autocolorscale true/false and set colorscales (contour case)', function(done) {
754 function _assert(msg, exp) {
755 var cc = [];
756 cc.push(getFill('.contourbg > path'));
757 d3SelectAll('.contourfill > path').each(function() {
758 cc.push(getFill(this));
759 });
760 expect(cc).toEqual(exp.contourColors);
761
762 expect(gd._fullData[0].colorscale).toEqual(exp.colorscale);
763 expect(gd._fullData[0].autocolorscale).toBe(exp.autocolorscale, msg);
764
765 expect(gd.data[0].colorscale).toEqual(exp.colorscaleIn);
766 expect(gd.data[0].autocolorscale).toBe(exp.autocolorscaleIn, msg);
767 }
768
769 // update via, assert then assert again (and again ;) after non-calc edits
770 function _run(msg, restyleObj, exp) {

Callers 2

_runFunction · 0.70
colorscale_test.jsFile · 0.70

Calls 1

getFillFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…