FN-6637: align chat multipart 400 regression test
Keep the chat route regression test focused on missing multipart content without adding attachments.\n\n- Update the multipart 400-path test to send an empty multipart request.\n- Document why attachment-only multipart requests remain valid for chat sends.\n\nFiles changed:\n packages/dashboard/src/__tests__/chat-routes.test.ts | 13 +++++--------\n 1 file changed, 5 insertions(+), 8 deletions(-) Fusion-Task-Id: FN-6637 Fusion-Task-Lineage: 63145e30-1a72-4fdd-8b60-e4eba65bb7aa
This commit is contained in:
@@ -1181,14 +1181,11 @@ describe("Chat API Routes", () => {
|
||||
it("returns 400 for multipart requests missing content instead of crashing", async () => {
|
||||
mockGetSession.mockReturnValue(sampleSession);
|
||||
|
||||
const { payload, boundary } = makeMultipartMessageRequest({
|
||||
files: [{
|
||||
fieldName: "attachments",
|
||||
filename: "note.txt",
|
||||
contentType: "text/plain",
|
||||
body: Buffer.from("hello"),
|
||||
}],
|
||||
});
|
||||
/**
|
||||
* FNXC:Chat 2026-06-18-06:34:
|
||||
* FN-6637 keeps this regression test aligned with the register-chat-routes.ts FNXC:Chat 2026-06-17-02:12 invariant: attachment-only multipart sends are valid, so the 400 no-SSE path must omit both text content and files.
|
||||
*/
|
||||
const { payload, boundary } = makeMultipartMessageRequest({});
|
||||
|
||||
const response = await request(
|
||||
app,
|
||||
|
||||
Reference in New Issue
Block a user