test(windows): cover portable credential stat errors
This commit is contained in:
@@ -191,6 +191,13 @@ describe('layer ladder', () => {
|
||||
.rejects.toThrow(/ENOTDIR/)
|
||||
})
|
||||
|
||||
it('propagates a permission check rejected before the OS lookup', async () => {
|
||||
const dir = await tempDir()
|
||||
const ctx = new Context()
|
||||
await expect(ctx.plugin(CredentialsLocal, { path: join(dir, '.credentials\0.yaml'), watch: false }))
|
||||
.rejects.toMatchObject({ code: 'ERR_INVALID_ARG_VALUE' })
|
||||
})
|
||||
|
||||
it('propagates a read that fails for a reason other than absence', async () => {
|
||||
const dir = await tempDir()
|
||||
const path = join(dir, '.credentials.yaml')
|
||||
|
||||
Reference in New Issue
Block a user