diff --git a/spec/main-process/atom-application.test.js b/spec/main-process/atom-application.test.js index f0418a78c84..d92094bbfb5 100644 --- a/spec/main-process/atom-application.test.js +++ b/spec/main-process/atom-application.test.js @@ -727,43 +727,6 @@ describe('AtomApplication', function() { assert.deepEqual(app.getAllWindows().map(w => Array.from(w._rootPaths)), [paths]) }) }) - - it('allows reopening an existing project after all windows are closed', async () => { - const tempDirPath = makeTempDir('reopen') - - const atomApplication = buildAtomApplication() - sinon.stub(atomApplication, 'promptForPathToOpen') - - // Open a window and then close it, leaving the app running - const [window] = await atomApplication.launch(parseCommandLine([])) - await focusWindow(window) - window.close() - await window.closedPromise - - // Reopen one of the recent projects - atomApplication.emit('application:reopen-project', { paths: [tempDirPath] }) - - const windows = atomApplication.getAllWindows() - - assert(windows.length === 1) - - await focusWindow(windows[0]) - - await conditionPromise( - async () => (await getTreeViewRootDirectories(windows[0])).length === 1 - ) - - // Check that the project was opened correctly. - assert.deepEqual( - await evalInWebContents( - windows[0].browserWindow.webContents, - send => { - send(atom.project.getPaths()) - } - ), - [tempDirPath] - ) - }) } describe('existing application re-use', function() {