Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
import {
|
||||
COMMIT_MESSAGE_AGENT_SPECS,
|
||||
COMMIT_MESSAGE_MODEL_JSON_STRUCTURE_LIMITS,
|
||||
CUSTOM_AGENT_ID,
|
||||
DEFAULT_COMMIT_MESSAGE_AGENT_ID,
|
||||
getCommitMessageAgentCapability,
|
||||
@@ -221,17 +220,6 @@ describe('model discovery parsers', () => {
|
||||
])
|
||||
})
|
||||
|
||||
it('rejects excessive Codex model nesting before JSON.parse', () => {
|
||||
const parseSpy = vi.spyOn(JSON, 'parse')
|
||||
const depth = COMMIT_MESSAGE_MODEL_JSON_STRUCTURE_LIMITS.nestingDepth + 1
|
||||
try {
|
||||
expect(parseCodexModels(`${'['.repeat(depth)}0${']'.repeat(depth)}`)).toEqual([])
|
||||
expect(parseSpy).not.toHaveBeenCalled()
|
||||
} finally {
|
||||
parseSpy.mockRestore()
|
||||
}
|
||||
})
|
||||
|
||||
it('parses one-model-per-line output', () => {
|
||||
expect(parseLineModels('opencode/gpt-5.4-mini\n\nopenai/gpt-5.5\n').map((m) => m.id)).toEqual([
|
||||
'opencode/gpt-5.4-mini',
|
||||
|
||||
Reference in New Issue
Block a user