From 04d8b9bb86221e71cc09266876d56333ddde9d20 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 12 Aug 2016 17:45:50 +0200 Subject: [PATCH] Ensure we don't reuse the same window when testing the offset distance Signed-off-by: Nathan Sobo --- spec/main-process/atom-application.test.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/main-process/atom-application.test.js b/spec/main-process/atom-application.test.js index e844f08ea..46d9669d4 100644 --- a/spec/main-process/atom-application.test.js +++ b/spec/main-process/atom-application.test.js @@ -90,13 +90,14 @@ describe('AtomApplication', function () { it('positions new windows at an offset distance from the previous window', async function () { const atomApplication = buildAtomApplication() - const window1 = atomApplication.launch(parseCommandLine([])) + const window1 = atomApplication.launch(parseCommandLine([makeTempDir()])) await window1.loadedPromise window1.browserWindow.setBounds({width: 400, height: 400, x: 0, y: 0}) - const window2 = atomApplication.launch(parseCommandLine([])) + const window2 = atomApplication.launch(parseCommandLine([makeTempDir()])) await window2.loadedPromise + assert.notEqual(window1, window2) window1Dimensions = window1.getDimensions() window2Dimensions = window2.getDimensions() assert.isAbove(window2Dimensions.x, window1Dimensions.x)