fix: backport libuv patch for fs.mkdir/mkdirSync on invlaid names (#20629)

Backports https://github.com/libuv/libuv/pull/2375
This commit is contained in:
Robo
2019-10-21 12:43:47 -07:00
committed by John Kleinschmidt
parent 3083693e67
commit 3b59f12495
3 changed files with 90 additions and 0 deletions

View File

@@ -623,6 +623,19 @@ describe('node feature', () => {
})
})
describe('fs.mkdir/mkdirSync', () => {
it('does not hang with {recursive: true} on invalid names', function (done) {
if (process.platform !== 'win32') {
return this.skip()
}
expect(() => fs.mkdirSync('invalid2:', { recursive: true })).to.throw()
fs.mkdir('invalid1:', { recursive: true }, (err) => {
expect(err).to.not.be.null()
done()
})
})
})
it('includes the electron version in process.versions', () => {
expect(process.versions)
.to.have.own.property('electron')