Skip to content

Commit

Permalink
[TEST] Asynchronous validation lock input
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartheleway committed Apr 18, 2024
1 parent e63c710 commit cbcc6d5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/normal.test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,20 @@ describe('table-multiple prompt [normal]', () => {
'└──────────┴───────┴───────┘"'
].join('\n'))

events.keypress('down')

expect(getScreen()).toMatchInlineSnapshot([
'"⠋ What do you want?',
'',
'┌──────────┬───────┬───────┐',
'│ 1-2 of 2 │ A? │ B? │',
'├──────────┼───────┼───────┤',
'│ Test 1 │ [ ◉ ] │ ◯ │',
'├──────────┼───────┼───────┤',
'│ Test 2 │ ◯ │ ◯ │',
'└──────────┴───────┴───────┘"'
].join('\n'))

await new Promise<void>(resolve => {
setTimeout(() => resolve(), 400)
})
Expand Down

0 comments on commit cbcc6d5

Please sign in to comment.