We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99c77fd commit 58c4338Copy full SHA for 58c4338
1 file changed
lib/validations.test.ts
@@ -432,3 +432,21 @@ describe('ogParamsSchema', () => {
432
expect(result.user).toBe('unknown');
433
});
434
435
+
436
+describe('streakParamsSchema — view fallback behavior', () => {
437
+ it('accepts "default" as a valid view value', () => {
438
+ expect(parse({ view: 'default' }).view).toBe('default');
439
+ });
440
441
+ it('accepts "monthly" as a valid view value', () => {
442
+ expect(parse({ view: 'monthly' }).view).toBe('monthly');
443
444
445
+ it('falls back to "default" for unknown view value', () => {
446
+ expect(parse({ view: 'radar' }).view).toBe('default');
447
448
449
+ it('defaults to "default" when view is omitted', () => {
450
+ expect(parse({}).view).toBe('default');
451
452
+});
0 commit comments