feat: configure ready outreach funnel limit
This commit is contained in:
1 parent
22eb32e5bf
commit
e9083281a8
15 files changed
+66
-11
No files matched your search
@@ -41,6 +41,18 @@ describe('ConfigSchema', () => {
|
||||
}
|
||||
});
|
||||
|
||||
it('defaults the ready-post limit to 25 and requires a bounded integer', () => {
|
||||
const result = ConfigSchema.safeParse(minimalConfig({ reddit: { subreddits: ['test'] } }));
|
||||
expect(result.success).toBe(true);
|
||||
if (result.success) expect(result.data.reddit.maxReadyCandidates).toBe(25);
|
||||
expect(ConfigSchema.safeParse(minimalConfig({
|
||||
reddit: { subreddits: ['test'], maxReadyCandidates: 0 },
|
||||
})).success).toBe(false);
|
||||
expect(ConfigSchema.safeParse(minimalConfig({
|
||||
reddit: { subreddits: ['test'], maxReadyCandidates: 25.5 },
|
||||
})).success).toBe(false);
|
||||
});
|
||||
|
||||
it('applies default tone to subreddits', () => {
|
||||
const result = ConfigSchema.safeParse(minimalConfig({ reddit: { subreddits: ['test'] } }));
|
||||
expect(result.success).toBe(true);
|
||||
|
||||
Reference in new issue
Block a user