Skip to content

Commit 339e7fd

Browse files
committed
fix(shell): Prompt doesn't show up when logging is on
1 parent 0c80a23 commit 339e7fd

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

test/Hubot_test.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ describe('Running hubot with args', () => {
112112
} finally {
113113
hubot.kill()
114114
}
115+
console.log(actual)
115116
assert.ok(actual instanceof TypeError)
116117
assert.deepEqual(actual.message, 'fetch failed')
117118
done()

test/Shell_test.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@ describe('Shell Adapter Integration Test', () => {
3939
await new Promise(resolve => setTimeout(resolve, 60))
4040
assert.deepEqual(wasCalled, true)
4141
})
42+
it('shows prompt if nothing was entered', async () => {
43+
let wasCalled = false
44+
robot.respond(/\n/, async res => {
45+
wasCalled = true
46+
await res.reply('hello from the other side')
47+
})
48+
robot.stdin.push('\n')
49+
robot.stdin.push(null)
50+
await new Promise(resolve => setTimeout(resolve, 60))
51+
assert.deepEqual(wasCalled, false)
52+
})
4253
})
4354
describe('Shell Adapter', () => {
4455
let robot = null

0 commit comments

Comments
 (0)