From 6b193124b6fa34caae86608aca96e829867ed545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barth=C3=A9lemy=20Laurans?= Date: Thu, 11 Apr 2024 01:55:31 +0200 Subject: [PATCH] Fix test to match with new undefined handling --- test/multiple.test.mts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/test/multiple.test.mts b/test/multiple.test.mts index abd2c48..08ab803 100644 --- a/test/multiple.test.mts +++ b/test/multiple.test.mts @@ -405,7 +405,7 @@ describe('table-multiple prompt [multiple]', () => { ]) }) - it('cannot select undefined choice when other choice selected', async () => { + it('can select undefined choice when other choice selected', async () => { const choices = [ { value: '1', @@ -474,7 +474,7 @@ describe('table-multiple prompt [multiple]', () => { '┌──────────┬───────┬───────┬───────────┐', '│ 1-2 of 2 │ A? │ B? │ Untouched │', '├──────────┼───────┼───────┼───────────┤', - '│ Test 1 │ ☒ │ ☐ │ [ ☐ ] │', + '│ Test 1 │ ☐ │ ☐ │ [ ☒ ] │', '├──────────┼───────┼───────┼───────────┤', '│ Test 2 │ ☐ │ ☐ │ ☒ │', '└──────────┴───────┴───────┴───────────┘"' @@ -482,12 +482,7 @@ describe('table-multiple prompt [multiple]', () => { events.keypress('enter') - await expect(answer).resolves.toEqual([ - { - choice: choices[0], - answers: ['A'], - } - ]) + await expect(answer).resolves.toEqual([]) }) it('goes back to undefined choice when no other choice selected', async () => {