From 48ea04f2eaaa97c95d36d9f076da64e4d97bf5bc Mon Sep 17 00:00:00 2001 From: ocasta181 Date: Tue, 11 Mar 2025 15:06:24 -0700 Subject: [PATCH] add test description --- src/utils/content-size.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utils/content-size.test.ts b/src/utils/content-size.test.ts index 848bdd3a..67f47a5a 100644 --- a/src/utils/content-size.test.ts +++ b/src/utils/content-size.test.ts @@ -72,6 +72,11 @@ describe("content-size", () => { expect(result.wouldExceedLimit).to.equal(false) }) + /** + * Verifies that estimateFileSize properly throws an error when given a + * non-existent file path, which is important for error handling in the application. + * The test expects fs.stat() inside estimateFileSize to fail and throw. + */ it("throws error for non-existent file", async () => { const nonExistentPath = path.join(os.tmpdir(), "non-existent.txt") try {