test(windows): skip POSIX-only assertions

This commit is contained in:
imccyu
2026-07-17 15:44:19 +08:00
parent b5fa2cb2b8
commit 228f6e3867
4 changed files with 6 additions and 5 deletions
@@ -84,7 +84,7 @@ describe('saveTextFile', () => {
expect(saved.path.includes('/..')).toBe(false)
})
it('creates the session dir with owner-only permissions', async () => {
it.skipIf(process.platform === 'win32')('creates the session dir with owner-only permissions', async () => {
const saved = await saveTextFile({ root, sessionId: 'sess-1', suggestedName: 'r.txt', content: 'x' })
// 0o700 dir, 0o600 file (masked by umask, but the owner bits must hold).
expect(statSync(dirname(saved.path)).mode & 0o700).toBe(0o700)