Skip to content

Commit 806eb32

Browse files
committed
fix(tests): resolve Choice type conflict in prompts test
Import local Choice type to prevent conflict with external @inquirer/select types when using external aliases config. Cast choices array to use local Choice<string> type. Fixes TypeScript error when external Socket packages are detected.
1 parent 5685214 commit 806eb32

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/prompts.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* @fileoverview Tests for themed prompt stubs.
33
*/
44

5+
import type { Choice } from '../src/prompts/index'
56
import { confirm, input, select } from '@socketsecurity/lib/prompts'
67
import { describe, expect, it } from 'vitest'
78

@@ -34,7 +35,7 @@ describe('prompts', () => {
3435
choices: [
3536
{ label: 'Option 1', value: '1' },
3637
{ label: 'Option 2', value: '2' },
37-
],
38+
] as Array<Choice<string>>,
3839
}),
3940
).rejects.toThrow('select() not yet implemented')
4041
})

0 commit comments

Comments
 (0)