Skip to content

Commit 09ee26e

Browse files
committed
test Plotly.validate for bad grids too
1 parent 2d84a8f commit 09ee26e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/jasmine/tests/plots_test.js

+10
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,16 @@ describe('grids', function() {
922922
})
923923
.then(function() {
924924
expect(gd._fullLayout.grid).toBeUndefined();
925+
926+
// check Plotly.validate on the same grids too
927+
[true, {}, {rows: 1, columns: 1}].forEach(function(gridVal) {
928+
var validation = Plotly.validate([], {grid: gridVal});
929+
expect(validation.length).toBe(1);
930+
expect(validation[0]).toEqual(jasmine.objectContaining({
931+
astr: 'grid',
932+
code: 'unused'
933+
}));
934+
});
925935
})
926936
.catch(failTest)
927937
.then(done);

0 commit comments

Comments
 (0)