fix: create missing directories with app.setPath (#18244)
This commit is contained in:
parent
1688ebdd40
commit
c621615112
2 changed files with 16 additions and 4 deletions
|
@ -667,6 +667,18 @@ describe('app module', () => {
|
|||
})
|
||||
})
|
||||
|
||||
describe('setPath(name, path)', () => {
|
||||
it('does not create a new directory by default', () => {
|
||||
const badPath = path.join(__dirname, 'music')
|
||||
|
||||
expect(fs.existsSync(badPath)).to.be.false
|
||||
app.setPath('music', badPath)
|
||||
expect(fs.existsSync(badPath)).to.be.false
|
||||
|
||||
expect(() => { app.getPath(badPath) }).to.throw()
|
||||
})
|
||||
})
|
||||
|
||||
describe('select-client-certificate event', () => {
|
||||
let w: BrowserWindow
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue