@@ -77,10 +77,13 @@ test("零参数默认在确认后会自动继续执行直到当前任务完成",
7777
7878test ( "只给开发文档路径但无法确定项目仓库时会停下来提示补充仓库路径" , ( ) => {
7979 const tempRoot = fs . mkdtempSync ( path . join ( os . tmpdir ( ) , "helloloop-missing-repo-" ) ) ;
80+ const fakeBin = path . join ( tempRoot , "bin" ) ;
8081 const docsRoot = path . join ( tempRoot , "docs-only" ) ;
82+ createFakeCodex ( fakeBin , sampleAnalysisPayload ( ) ) ;
8183 writeText ( path . join ( docsRoot , "plan.md" ) , "# 方案\n- 待开发\n" ) ;
8284
8385 const result = spawnHelloLoop ( [ docsRoot ] , {
86+ env : buildCliEnv ( fakeBin ) ,
8487 input : "1\n" ,
8588 } ) ;
8689
@@ -95,10 +98,13 @@ test("只给开发文档路径但无法确定项目仓库时会停下来提示
9598
9699test ( "只给项目路径但找不到 docs 时会停下来提示补充文档路径" , ( ) => {
97100 const tempRoot = fs . mkdtempSync ( path . join ( os . tmpdir ( ) , "helloloop-missing-docs-" ) ) ;
101+ const fakeBin = path . join ( tempRoot , "bin" ) ;
98102 const tempRepo = path . join ( tempRoot , "demo-project" ) ;
103+ createFakeCodex ( fakeBin , sampleAnalysisPayload ( ) ) ;
99104 writeText ( path . join ( tempRepo , "src" , "index.js" ) , "console.log('hello');\n" ) ;
100105
101106 const result = spawnHelloLoop ( [ tempRepo ] , {
107+ env : buildCliEnv ( fakeBin ) ,
102108 input : "1\n" ,
103109 } ) ;
104110
0 commit comments