style: format with vp fmt (#38803)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Stephen Zhouandautofix-ci[bot] authored and GitHub committed 2026-07-12 15:57:46 +00:00
1 parent fde08d24fe
commit a84c2d36a3
6213 files changed
+227959 -187183

No files matched your search

+19 -4
View File
@@ -11,20 +11,35 @@ describe('OutputFormatNotSupportedError', () => {
describe('UnsupportedArgValueError', () => {
it('includes both long and short option labels when a char exists', () => {
const def: FlagDefinition = { type: 'string', description: 'output', char: 'o', options: ['json', 'yaml'] }
const def: FlagDefinition = {
type: 'string',
description: 'output',
char: 'o',
options: ['json', 'yaml'],
}
const err = new UnsupportedArgValueError('output', def, 'csv')
expect(err.message).toBe('illegal value csv for flag --output / -o')
})
it('omits the short option label when the flag has no char', () => {
const def: FlagDefinition = { type: 'string', description: 'app mode', options: ['chat', 'workflow'] }
const def: FlagDefinition = {
type: 'string',
description: 'app mode',
options: ['chat', 'workflow'],
}
const err = new UnsupportedArgValueError('mode', def, 'chatbot')
expect(err.message).toBe('illegal value chatbot for flag --mode')
})
it('lists supported values in the hint', () => {
const def: FlagDefinition = { type: 'string', description: 'app mode', options: ['chat', 'workflow'] }
expect(new UnsupportedArgValueError('mode', def, 'chatbot').hint).toBe('supported value: chat, workflow')
const def: FlagDefinition = {
type: 'string',
description: 'app mode',
options: ['chat', 'workflow'],
}
expect(new UnsupportedArgValueError('mode', def, 'chatbot').hint).toBe(
'supported value: chat, workflow',
)
})
it('leaves the hint empty when the flag declares no options', () => {