Skip to content

Commit 6b19312

Browse files
committed
Fix test to match with new undefined handling
1 parent 25c159f commit 6b19312

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

test/multiple.test.mts

+3-8
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ describe('table-multiple prompt [multiple]', () => {
405405
])
406406
})
407407

408-
it('cannot select undefined choice when other choice selected', async () => {
408+
it('can select undefined choice when other choice selected', async () => {
409409
const choices = [
410410
{
411411
value: '1',
@@ -474,20 +474,15 @@ describe('table-multiple prompt [multiple]', () => {
474474
'┌──────────┬───────┬───────┬───────────┐',
475475
'│ 1-2 of 2 │ A? │ B? │ Untouched │',
476476
'├──────────┼───────┼───────┼───────────┤',
477-
'│ Test 1 │ │ ☐ │ [ ] │',
477+
'│ Test 1 │ │ ☐ │ [ ] │',
478478
'├──────────┼───────┼───────┼───────────┤',
479479
'│ Test 2 │ ☐ │ ☐ │ ☒ │',
480480
'└──────────┴───────┴───────┴───────────┘"'
481481
].join('\n'))
482482

483483
events.keypress('enter')
484484

485-
await expect(answer).resolves.toEqual([
486-
{
487-
choice: choices[0],
488-
answers: ['A'],
489-
}
490-
])
485+
await expect(answer).resolves.toEqual([])
491486
})
492487

493488
it('goes back to undefined choice when no other choice selected', async () => {

0 commit comments

Comments
 (0)