Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

test(api): fix upload limit assertion input

Tinae76bf57c3bd
diff --git a/tests/api/storage/s3.test.ts b/tests/api/storage/s3.test.ts
index 579169ab6..ae17d71d0 100644
--- a/tests/api/storage/s3.test.ts
+++ b/tests/api/storage/s3.test.ts
@@ -93,7 +93,9 @@ describe("S3 helpers", () => {
expect(() => validateTaskAssetUploadInput("image/png", 0)).toThrow(
"Upload size must be greater than zero.",
);
- expect(() => validateTaskAssetUploadInput("image/png", 2048)).toThrow(
+ expect(
+ () => validateTaskAssetUploadInput("image/png", 2 * 1024 * 1024),
+ ).toThrow(
"Upload exceeds the maximum upload size of 1MB.",
);
expect(() => validateTaskAssetUploadInput("image/png", 512)).not.toThrow();