fix(web): report a wrapped paste as the same API key format failure

This commit is contained in:
Yichen Jiang
2026-08-07 14:03:11 +08:00
parent 545080105f
commit 0823a3484a
10 changed files with 20 additions and 16 deletions

View File

@@ -1121,8 +1121,8 @@ describe('apiKeyFailure', () => {
['double quotes', '"sk-abc"'],
['single quotes', '\'sk-abc\''],
['backticks', '`sk-abc`'],
])('fails %s as wrapped', (_label, draft) => {
expect(apiKeyFailure(draft)).toBe('keyLooksWrapped')
])('fails %s as a format failure', (_label, draft) => {
expect(apiKeyFailure(draft)).toBe('keyIllegalCharacters')
})
it('needs a matching closing quote before it calls a value wrapped', () => {