diff --git a/tests/unit/utils/io/file-info.spec.ts b/tests/unit/utils/io/file-info.spec.ts index 3318a41..8a93ca9 100644 --- a/tests/unit/utils/io/file-info.spec.ts +++ b/tests/unit/utils/io/file-info.spec.ts @@ -102,15 +102,15 @@ describe("FileInfo", () => { }); describe("stream", () => { - test("creates a readable stream", () => { + test("creates a readable stream", () => new Promise(resolve => { const info = new FileInfo("path/to/test.txt"); const stream = info.stream(); expect(stream).toBeDefined(); expect(stream.readable).toBe(true); - stream.close(); - }); + stream.close(resolve); + })); }); describe("buffer", () => {