test: close the per-file coverage gaps this PR opened

The layered-env reader gained an unreadable-layer path, a default
reporter, and two absent-layer arms with no cases; the credential store
gained two error paths that must not be mistaken for an absent file.

The platform arms and the `linePos` guard cannot be reached from a POSIX
test run — the first is covered by the native Windows job, the second
only satisfies an optional type that `prettyErrors` always fills — so
both carry a v8 ignore naming why.
This commit is contained in:
Yichen Jiang
2026-08-05 13:20:56 +08:00
parent f50b60390c
commit 69d8621e2e
5 changed files with 134 additions and 0 deletions

View File

@@ -76,6 +76,7 @@ export interface EnvironmentSnapshot {
* @returns the key to store and look up by.
*/
function lookupKey(name: string): string {
/* v8 ignore next -- native Windows coverage exercises the folding arm; POSIX covers the exact one */
return process.platform === 'win32' ? name.toUpperCase() : name
}