Skip to content

Commit ca46666

Browse files
committed
simplify plot_test
1 parent cd8c978 commit ca46666

File tree

1 file changed

+11
-22
lines changed

1 file changed

+11
-22
lines changed

test/jasmine/tests/plots_test.js

+11-22
Original file line numberDiff line numberDiff line change
@@ -414,30 +414,19 @@ describe('Test Plots', function() {
414414
'_hmpixcount', '_hmlumcount', '_mouseDownTime', '_legendMouseDownTime',
415415
];
416416

417+
var expectedUndefined = [
418+
'data', 'layout', '_fullData', '_fullLayout', 'calcdata', 'framework',
419+
'empty', 'fid', 'undoqueue', 'undonum', 'autoplay', 'changed',
420+
'_promises', '_redrawTimer', 'firstscatter', 'hmlumcount', 'hmpixcount',
421+
'numboxes', '_hoverTimer', '_lastHoverTime', '_transitionData',
422+
'_transitioning'
423+
];
424+
417425
Plots.purge(gd);
418426
expect(Object.keys(gd).sort()).toEqual(expectedKeys.sort());
419-
expect(gd.data).toBeUndefined();
420-
expect(gd.layout).toBeUndefined();
421-
expect(gd._fullData).toBeUndefined();
422-
expect(gd._fullLayout).toBeUndefined();
423-
expect(gd.calcdata).toBeUndefined();
424-
expect(gd.framework).toBeUndefined();
425-
expect(gd.empty).toBeUndefined();
426-
expect(gd.fid).toBeUndefined();
427-
expect(gd.undoqueue).toBeUndefined();
428-
expect(gd.undonum).toBeUndefined();
429-
expect(gd.autoplay).toBeUndefined();
430-
expect(gd.changed).toBeUndefined();
431-
expect(gd._promises).toBeUndefined();
432-
expect(gd._redrawTimer).toBeUndefined();
433-
expect(gd.firstscatter).toBeUndefined();
434-
expect(gd.hmlumcount).toBeUndefined();
435-
expect(gd.hmpixcount).toBeUndefined();
436-
expect(gd.numboxes).toBeUndefined();
437-
expect(gd._hoverTimer).toBeUndefined();
438-
expect(gd._lastHoverTime).toBeUndefined();
439-
expect(gd._transitionData).toBeUndefined();
440-
expect(gd._transitioning).toBeUndefined();
427+
expectedUndefined.forEach(function(key) {
428+
expect(gd[key]).toBeUndefined(key);
429+
});
441430
});
442431
});
443432

0 commit comments

Comments
 (0)