mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
test: align batch empty-input assertion with modality-aware error
The batch endpoint became modality-aware, so an empty request returns the generic "No files provided" rather than the legacy image-specific message. The assertion still matched /no image/i (a pre-existing stale spec on main), so it failed against the correct behavior. Match /no files/i instead.
This commit is contained in:
@@ -309,7 +309,9 @@ describe("Batch error handling", () => {
|
||||
|
||||
expect(res.statusCode).toBe(400);
|
||||
const result = JSON.parse(res.body);
|
||||
expect(result.error).toMatch(/no image/i);
|
||||
// Batch is modality-aware now, so the empty-input error is generic
|
||||
// ("No files provided") rather than the legacy image-specific message.
|
||||
expect(result.error).toMatch(/no files/i);
|
||||
});
|
||||
|
||||
it("returns 400 for invalid settings JSON", async () => {
|
||||
|
||||
Reference in New Issue
Block a user