🐞 fix: Update config file handling

This commit is contained in:
Keith Solomon
2026-05-16 15:23:40 -05:00
parent e7748d3307
commit cb568597dc
2 changed files with 32 additions and 1 deletions
+22
View File
@@ -19,6 +19,28 @@ output:
expect(config.enrichment.concurrency).toBe(3);
});
it('treats comment-only YAML maps as empty objects', () => {
const config = loadConfigFromString(`
gmail:
folder: Newsletters
output:
name: Newsletter Link Catalog
excel:
enabled: true
path: ./output/catalog.xlsx
newsletters:
# sender@example.com:
categories:
custom:
- Rust
llm:
# provider: anthropic
`);
expect(config.newsletters).toEqual({});
expect(config.categories.llm.provider).toBe('anthropic');
});
it('rejects conflicting relative and absolute date filters', () => {
expect(() => validateDateFilters({ last: '30d', from: '2026-01-01' })).toThrow(
/cannot be combined/i