Skip to content

Commit 70eed9a

Browse files
remove setTimeout calls (by replacing rli.close() with fi.end())
1 parent ff336e5 commit 70eed9a

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

test/parallel/test-readline-promises-interface.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,7 @@ function assertCursorRowsAndCols(rli, rows, cols) {
204204
fi.emit('data', character);
205205
}
206206
fi.emit('data', '\n');
207-
setTimeout(() => {
208-
rli.close();
209-
}, common.platformTimeout(100));
207+
fi.end();
210208
}
211209

212210
// \t when there is no completer function should behave like an ordinary

test/parallel/test-readline-promises-tab-complete.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ if (process.env.TERM === 'dumb') {
8080
output = '';
8181
});
8282
}
83-
setTimeout(() => {
84-
rli.close();
85-
}, common.platformTimeout(100));
83+
fi.end();
8684
});
8785
});
8886
});
@@ -116,7 +114,5 @@ if (process.env.TERM === 'dumb') {
116114
assert.match(output, /^Tab completion error: Error: message/);
117115
output = '';
118116
});
119-
setTimeout(() => {
120-
rli.close();
121-
}, common.platformTimeout(100));
117+
fi.end();
122118
}

0 commit comments

Comments
 (0)