Stub the storage folder application.json read

This commit is contained in:
Ash Wilson 2019-04-18 17:05:41 -04:00
parent 1a48b987ca
commit e35510e928
No known key found for this signature in database
GPG Key ID: 81B1DDB704F69D2A

View File

@ -640,6 +640,11 @@ class LaunchScenario {
...options
})
this.sinon.stub(app, 'createWindow', loadSettings => new StubWindow(this.sinon, loadSettings, options))
this.sinon.stub(app.storageFolder, 'load', () => Promise.resolve(
(options.applicationJson || []).map(each => ({
initialPaths: this.convertPaths(each.initialPaths)
}))
))
this.applications.add(app)
return app
}