Skip to content

Commit 598e35b

Browse files
committed
schema bounds, exclude templates from test coverage
1 parent ae92a6a commit 598e35b

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/api/routes/events.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,15 @@ const baseSchema = z.object({
124124
const requestSchema = baseSchema.extend({
125125
repeats: z.optional(z.enum(repeatOptions)),
126126
repeatEnds: z.string().optional(),
127-
repeatExcludes: z.array(z.string().date()).optional().openapi({
128-
description:
129-
"Dates to exclude from recurrence rules (in the America/Chicago timezone).",
130-
}),
127+
repeatExcludes: z
128+
.array(z.string().date())
129+
.min(1)
130+
.max(100)
131+
.optional()
132+
.openapi({
133+
description:
134+
"Dates to exclude from recurrence rules (in the America/Chicago timezone).",
135+
}),
131136
});
132137

133138
const postRequestSchema = requestSchema

tests/unit/vitest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default defineConfig({
1111
coverage: {
1212
provider: "istanbul",
1313
include: ["src/api/**/*.ts", "src/common/**/*.ts"],
14-
exclude: ["src/api/lambda.ts"],
14+
exclude: ["src/api/lambda.ts", "src/api/sqs/handlers/templates/*.ts"],
1515
thresholds: {
1616
statements: 54,
1717
functions: 65,

0 commit comments

Comments
 (0)