diff --git a/spec/main-process/atom-application.test.js b/spec/main-process/atom-application.test.js index d4a913859..1e5ae0a86 100644 --- a/spec/main-process/atom-application.test.js +++ b/spec/main-process/atom-application.test.js @@ -508,7 +508,8 @@ describe('AtomApplication', function () { } function makeTempDir (name) { - return fs.realpathSync(require('temp').mkdirSync(name)) + const temp = require('temp').track() + return fs.realpathSync(temp.mkdirSync(name)) } let channelIdCounter = 0 diff --git a/spec/title-bar-spec.js b/spec/title-bar-spec.js index c0cb806b5..b219a5819 100644 --- a/spec/title-bar-spec.js +++ b/spec/title-bar-spec.js @@ -1,5 +1,5 @@ const TitleBar = require('../src/title-bar') -const temp = require('temp') +const temp = require('temp').track() describe('TitleBar', () => { it('updates its title when document.title changes', () => { diff --git a/src/main-process/start.js b/src/main-process/start.js index fae78a07e..9670e67b6 100644 --- a/src/main-process/start.js +++ b/src/main-process/start.js @@ -1,7 +1,7 @@ const {app} = require('electron') const nslog = require('nslog') const path = require('path') -const temp = require('temp') +const temp = require('temp').track() const parseCommandLine = require('./parse-command-line') const startCrashReporter = require('../crash-reporter-start') const atomPaths = require('../atom-paths')