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:
@@ -250,6 +250,7 @@ export class SettingsLocal extends Settings {
|
||||
throw new Error(`settings-local: invalid document at ${this.spec.filename}: ${
|
||||
document.errors.map((error) => {
|
||||
const at = error.linePos?.[0]
|
||||
/* v8 ignore next -- `prettyErrors` populates linePos on every error; the guard answers its optional type */
|
||||
return `${error.code}${at === undefined ? '' : ` at line ${String(at.line)}, column ${String(at.col)}`}`
|
||||
}).join('; ')}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user