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

Function expectForward

test/jasmine/tests/axes_test.js:1743–1754  ·  view source on GitHub ↗
(done, minallowed)

Source from the content-addressed store, hash-verified

1741 afterEach(destroyGraphDiv);
1742
1743 function expectForward(done, minallowed) {
1744 Plotly.newPlot(gd, [{
1745 x: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
1746 y: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
1747 }], {
1748 xaxis: { minallowed: minallowed }
1749 }).then(function() {
1750 var r = gd._fullLayout.xaxis.range;
1751 expect(r[0]).toBeLessThan(r[1], 'axis should not be reversed for minallowed=' + minallowed);
1752 expect(r[0]).toBe(minallowed, 'axis min should be pinned at minallowed');
1753 }).then(done, done.fail);
1754 }
1755
1756 it('does not reverse axis when minallowed exceeds default range max', function(done) {
1757 expectForward(done, 7);

Callers 1

axes_test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…