Skip to content

Commit

Permalink
test: stub process.stdin.isTTY
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Feb 22, 2024
1 parent 271b66b commit 7ede36d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/cli-ux/prompt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ describe('prompt', () => {

it('should timeout after provided timeout', async () => {
stubReadline([''])
sandbox.stub(process, 'stdin').value({isTTY: true})
try {
await ux.prompt('Require input?', {timeout: 10})
expect.fail('should have thrown')
Expand Down

0 comments on commit 7ede36d

Please sign in to comment.