test(windows): close native coverage gaps

This commit is contained in:
Tianyi Cui
2026-08-09 03:12:58 +08:00
parent 94799abfb0
commit bfb456e0c6
8 changed files with 63 additions and 5 deletions

View File

@@ -137,6 +137,13 @@ describe('boot and reads', () => {
await expect(boot({ path, watch: false })).rejects.toThrow(/EACCES|permission/i)
})
it('fails loud when the document path names a directory', async () => {
const dir = await tempDir()
const path = join(dir, 'settings.yaml')
await mkdir(path)
await expect(boot({ path, watch: false })).rejects.toThrow(/EISDIR|directory/i)
})
it('fails loud on an unsupported extension', async () => {
const dir = await tempDir()
await expect(boot({ path: join(dir, 'settings.toml'), watch: false }))