From 1fb066ad682aa506cdccf232056df13be2ebb425 Mon Sep 17 00:00:00 2001 From: = Date: Sat, 7 Jan 2017 23:11:31 +0300 Subject: [PATCH] Really fix tests on windows Path names with backslashes was not quoted. --- spec/main-process/atom-application.test.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/spec/main-process/atom-application.test.js b/spec/main-process/atom-application.test.js index a5e28b238..c504d2503 100644 --- a/spec/main-process/atom-application.test.js +++ b/spec/main-process/atom-application.test.js @@ -58,21 +58,18 @@ describe('AtomApplication', function () { await focusWindow(window) const addProjectPathFn = function (dir) { - return 'function (sendBackToMainProcess) { atom.project.addPath("' + dir + '"); sendBackToMainProcess(null); }' + return 'function (sendBackToMainProcess) { atom.project.addPath(' + JSON.stringify(dir) + '); sendBackToMainProcess(null); }' } const removeProjectPathFn = function (dir) { - return 'function (sendBackToMainProcess) { atom.project.removePath("' + dir + '"); sendBackToMainProcess(null); }' + return 'function (sendBackToMainProcess) { atom.project.removePath(' + JSON.stringify(dir) + '); sendBackToMainProcess(null); }' } atomApplication.saveState = mockSaveState await evalInWebContents(window.browserWindow.webContents, addProjectPathFn(dirA)) - await conditionPromise(() => cnt === 1) assert.equal(cnt, 1) await evalInWebContents(window.browserWindow.webContents, addProjectPathFn(dirB)) - await conditionPromise(() => cnt === 2) assert.equal(cnt, 2) await evalInWebContents(window.browserWindow.webContents, removeProjectPathFn(dirA)) - await conditionPromise(() => cnt === 3) assert.equal(cnt, 3) }) })