UNPKG

siesta-lite

Version:

Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers

20 lines (14 loc) 483 B
describe('Recording window resize', function (t) { var rec = new Siesta.Recorder.ExtJS({ window : t.global }) rec.start(); t.waitForEvent(rec, 'actionadd', function() { var actions = rec.getRecordedActions(); t.expect(actions.length).toBe(1); t.expect(actions[0].action).toBe('setWindowSize'); t.isDeeply(actions[0].value, [200, 300]); }); t.firesOnce(window, 'resize'); t.setWindowSize(200, 300); })