fix(backups): отделить результат операций от ошибок журнала

This commit is contained in:
Denozordec committed 2026-10-01 15:11:32 +07:00
1 parent 3dcc7c9ea6
commit 5ce21e9a47
10 files changed
+113 -67

No files matched your search

+1
View File
@@ -44,6 +44,7 @@ test("invalid mutations fail before HTTP; create receives job acknowledgment", a
assert.equal(calls, 0)
assert.equal((await createBackupsAsync(base, { serverIds: ["1"], notes: "manual" })).jobId, "job-1")
assert.deepEqual(body, { serverIds: ["1"], notes: "manual" })
globalThis.fetch = async () => json({ jobId: "job-1", status: "queued", total: 2, completed: 0 }, 202); await assert.rejects(() => createBackupsAsync(base, { serverIds: ["1"] }), /всех выбранных/);
globalThis.fetch = async () => json({ created: [item], failures: [] }); await assert.rejects(() => createBackupsAsync(base, { serverIds: ["1"] }))
} finally { globalThis.fetch = original }
})