Skip to content

Commit f757b55

Browse files
committed
fix tests
1 parent 08a10d2 commit f757b55

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

common/src/json-config/__tests__/constants.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
type CodebuffConfig,
1111
type StartupProcess,
1212
} from '../constants'
13+
import { MAX_AGENT_STEPS_DEFAULT } from 'src/constants/agents'
1314

1415
describe('constants', () => {
1516
describe('codebuffConfigFile and codebuffConfigFileBackup', () => {
@@ -142,7 +143,7 @@ describe('constants', () => {
142143
const result = CodebuffConfigSchema.safeParse(emptyConfig)
143144
expect(result.success).toBe(true)
144145
if (result.success) {
145-
expect(result.data.maxAgentSteps).toBe(12) // default value
146+
expect(result.data.maxAgentSteps).toBe(MAX_AGENT_STEPS_DEFAULT)
146147
expect(result.data.description).toBeUndefined()
147148
expect(result.data.startupProcesses).toBeUndefined()
148149
expect(result.data.fileChangeHooks).toBeUndefined()
@@ -158,7 +159,7 @@ describe('constants', () => {
158159
expect(result.success).toBe(true)
159160
if (result.success) {
160161
expect(result.data.description).toBe('My project config')
161-
expect(result.data.maxAgentSteps).toBe(12)
162+
expect(result.data.maxAgentSteps).toBe(MAX_AGENT_STEPS_DEFAULT)
162163
}
163164
})
164165

@@ -180,7 +181,7 @@ describe('constants', () => {
180181
filePattern: '**/*.ts',
181182
},
182183
],
183-
maxAgentSteps: 20,
184+
maxAgentSteps: MAX_AGENT_STEPS_DEFAULT,
184185
}
185186

186187
const result = CodebuffConfigSchema.safeParse(config)
@@ -228,7 +229,7 @@ describe('constants', () => {
228229
const result = CodebuffConfigSchema.safeParse(config)
229230
expect(result.success).toBe(true)
230231
if (result.success) {
231-
expect(result.data.maxAgentSteps).toBe(12)
232+
expect(result.data.maxAgentSteps).toBe(MAX_AGENT_STEPS_DEFAULT)
232233
}
233234
})
234235

0 commit comments

Comments
 (0)