test(windows): close final native coverage gaps

This commit is contained in:
Tianyi Cui
2026-08-09 00:48:46 +08:00
parent d2928584e7
commit 9e724dcad7
11 changed files with 88 additions and 30 deletions
+2 -2
View File
@@ -55,7 +55,7 @@ describe('renderUri', () => {
it('returns an absolute path for a file: URI outside the workspace', () => {
const outside = resolve(WS, '..', 'other', 'lib', 'b.ts')
const uri = pathToFileURL(outside).href
expect(renderUri(uri, WS_URI)).toBe(outside)
expect(renderUri(uri, WS_URI)).toBe(outside.replaceAll('\\', '/'))
})
it('renders the workspace root itself as "."', () => {
@@ -83,7 +83,7 @@ describe('renderUri', () => {
})
it('preserves backslashes as ordinary POSIX filename characters', () => {
expect(renderUri('file:///home/u/proj/dir%5Cname/a.ts', WS_URI)).toBe('dir\\name/a.ts')
expect(renderUri('file:///home/u/proj/dir%5Cname/a.ts', 'file:///home/u/proj')).toBe('dir\\name/a.ts')
})
it('keeps malformed or mismatched URI coordinates verbatim', () => {