test(chat): add test for defaulting nullable content to an empty string
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { stringOrEmpty } from "../nullable-defaults";
|
||||
import { ChatLockDetailSchema } from "./chat_payloads";
|
||||
|
||||
/**
|
||||
@@ -9,7 +10,7 @@ export const UnlockPrivateReasonSchema = z.string().default("");
|
||||
|
||||
export const UnlockPrivateResponseSchema = z.object({
|
||||
unlocked: z.boolean(),
|
||||
content: z.string().default(""),
|
||||
content: stringOrEmpty,
|
||||
reason: UnlockPrivateReasonSchema,
|
||||
creditBalance: z.number().default(0),
|
||||
creditsCharged: z.number().default(0),
|
||||
|
||||
Reference in New Issue
Block a user