Skip to content

Commit 1f730ce

Browse files
authored
fix: robot_test exited before finishing other tests (#1688)
1 parent c9f0d10 commit 1f730ce

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/adapters/shell.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class Shell extends Adapter {
6363
case '\\q':
6464
case 'exit':
6565
this.#rl.close()
66+
process.exit(0)
6667
break
6768
case '\\?':
6869
case 'help':
@@ -92,8 +93,6 @@ class Shell extends Adapter {
9293
const user = this.robot.brain.userForId(userId, { name: userName, room: 'Shell' })
9394
await this.receive(new TextMessage(user, input, 'messageId'))
9495
this.#rl.prompt()
95-
}).on('close', () => {
96-
process.exit(0)
9796
})
9897
try {
9998
this.#rl.prompt()
@@ -108,8 +107,6 @@ class Shell extends Adapter {
108107
if (this.#rl?.close) {
109108
this.#rl.close()
110109
}
111-
this.cli.removeAllListeners()
112-
this.cli.close()
113110
}
114111
}
115112

0 commit comments

Comments
 (0)