Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/cli-repl/src/run.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ describe('CLI entry point', function () {
let stdout = '';
let stderr = '';
let wroteConnectionString = false;
let wroteAnyKeyToExit = false;
proc.stdout.setEncoding('utf8').on('data', (chunk) => {
stdout += chunk;
if (
Expand All @@ -83,8 +84,9 @@ describe('CLI entry point', function () {
proc.stdin.write('/\n');
wroteConnectionString = true;
}
if (stdout.includes('Press any key to exit')) {
if (!wroteAnyKeyToExit && stdout.includes('Press any key to exit')) {
proc.stdin.write('x');
wroteAnyKeyToExit = true;
}
});
proc.stderr.setEncoding('utf8').on('data', (chunk) => {
Expand Down
Loading