Skip to content

Commit 48ea04f

Browse files
committed
add test description
1 parent e11ad16 commit 48ea04f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/utils/content-size.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ describe("content-size", () => {
7272
expect(result.wouldExceedLimit).to.equal(false)
7373
})
7474

75+
/**
76+
* Verifies that estimateFileSize properly throws an error when given a
77+
* non-existent file path, which is important for error handling in the application.
78+
* The test expects fs.stat() inside estimateFileSize to fail and throw.
79+
*/
7580
it("throws error for non-existent file", async () => {
7681
const nonExistentPath = path.join(os.tmpdir(), "non-existent.txt")
7782
try {

0 commit comments

Comments
 (0)