Fixed I/O tests randomly failing

This commit is contained in:
Kir_Antipov 2024-01-15 15:01:32 +03:00
parent 9436723476
commit e407797735

View file

@ -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", () => {