Add comprehensive tests for parseConfiguration function, handle non-object parser results consistently (fixes #1523).

This commit is contained in:
David Anson 2025-03-01 18:23:48 -08:00
parent 1f237e6c54
commit 63147ee1eb
4 changed files with 97 additions and 11 deletions

View file

@ -1183,6 +1183,7 @@ export function readConfigSync(file, parsers, fs) {
// Try to parse file
const { config, message } = parseConfiguration(file, content, parsers);
if (!config) {
// @ts-ignore
throw new Error(message);
}
// Extend configuration