From 63eec70350f60d8b435b2c3abcd66a92b9611fc2 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Nov 2016 13:20:01 -0800 Subject: [PATCH] Assert bounds when restoring --- spec/api-browser-window-spec.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index 75e4dab0b262..f18322bbf40a 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -1764,10 +1764,11 @@ describe('browser-window module', function () { }) }) - it('should set the correct width when minWidth is used', function () { + it('should restore the correct bounds when minWidth is used', function () { + const initialSize = w.getSize() w.minimize() w.restore() - assert.equal(w.getSize()[0], 800) + assertBoundsEqual(w.getSize(), initialSize) }) }) @@ -1781,7 +1782,7 @@ describe('browser-window module', function () { const initialPosition = w.getPosition() w.maximize() w.unmaximize() - assertBoundsEqual(initialPosition, w.getPosition()) + assertBoundsEqual(w.getPosition(), initialPosition) }) }) })