Skip to content
This repository was archived by the owner on Jun 24, 2024. It is now read-only.

Commit 4da61c6

Browse files
Walkerdigitalsadhu
authored andcommitted
test(reader): Add test to fix intermittent code coverage issue
Was sometimes missing full code coverage
1 parent 89c0d07 commit 4da61c6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/reader.test.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,24 @@ test('Event: file not found multiple streams', done => {
136136
reader.resume();
137137
});
138138

139+
test('Event: file not found on all streams, pipeline ready event', done => {
140+
expect.assertions(1);
141+
const sink = new SinkFs({
142+
path: path.join(__dirname, './test-assets'),
143+
});
144+
const feedStream1 = sink.reader('does-not-exist.json');
145+
const feedStream2 = sink.reader('does-not-exist.json');
146+
const reader = new Reader([feedStream1, feedStream2]);
147+
148+
reader.on('pipeline ready', () => {
149+
expect(true).toBe(true);
150+
done();
151+
});
152+
153+
reader.on('end', () => {});
154+
reader.resume();
155+
});
156+
139157
test('Event: parse error', done => {
140158
expect.assertions(1);
141159
const sink = new SinkFs({

0 commit comments

Comments
 (0)