mirror of
https://github.com/Kir-Antipov/mc-publish.git
synced 2024-11-21 16:00:59 -05:00
Fixed I/O tests randomly failing
This commit is contained in:
parent
9436723476
commit
e407797735
1 changed files with 3 additions and 3 deletions
|
@ -102,15 +102,15 @@ describe("FileInfo", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("stream", () => {
|
describe("stream", () => {
|
||||||
test("creates a readable stream", () => {
|
test("creates a readable stream", () => new Promise(resolve => {
|
||||||
const info = new FileInfo("path/to/test.txt");
|
const info = new FileInfo("path/to/test.txt");
|
||||||
const stream = info.stream();
|
const stream = info.stream();
|
||||||
|
|
||||||
expect(stream).toBeDefined();
|
expect(stream).toBeDefined();
|
||||||
expect(stream.readable).toBe(true);
|
expect(stream.readable).toBe(true);
|
||||||
|
|
||||||
stream.close();
|
stream.close(resolve);
|
||||||
});
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("buffer", () => {
|
describe("buffer", () => {
|
||||||
|
|
Loading…
Reference in a new issue