Skip to content

Commit 2739457

Browse files
committed
Fix test on node < 18
1 parent 5bc294e commit 2739457

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/transmit.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,6 +1447,15 @@ describe('transmission', () => {
14471447
const handler = (request, h) => {
14481448

14491449
const stream = new Stream.Readable({ read: Hoek.ignore });
1450+
if (stream.errored === undefined) {
1451+
1452+
// Expose errored property on node 14 & 16 to enable coverage
1453+
1454+
stream.on('error', () => {
1455+
1456+
stream.errored = true;
1457+
});
1458+
}
14501459

14511460
stream.push('hello');
14521461
Hoek.wait(1).then(() => stream.destroy(new Error('failed')));

0 commit comments

Comments
 (0)