@@ -178,48 +178,3 @@ it.live(
178178 } ) ,
179179 30_000 ,
180180)
181-
182- it . live (
183- "plugin calls await a different location's strategy and directory configuration" ,
184- ( ) =>
185- Effect . gen ( function * ( ) {
186- const tmp = yield * Effect . acquireDisposable ( Effect . promise ( ( ) => tmpdir ( "opencode-worktree-delegate-" ) ) )
187- const source = path . join ( tmp . path , "source" )
188- const target = path . join ( tmp . path , "target" )
189- const destination = path . join ( tmp . path , "copies" )
190- yield * Effect . promise ( async ( ) => {
191- for ( const directory of [ source , target ] ) {
192- await fs . mkdir ( directory )
193- await initRepo ( directory )
194- await $ `git remote add origin git@github.com:example/delegate-fixture.git` . cwd ( directory ) . quiet ( )
195- }
196- await Bun . write (
197- path . join ( source , "opencode.json" ) ,
198- JSON . stringify ( {
199- plugins : [
200- { package : path . join ( import . meta. dir , "fixture/worktree-delegate" ) , options : { directory : target } } ,
201- ] ,
202- } ) ,
203- )
204- await Bun . write (
205- path . join ( target , "opencode.json" ) ,
206- JSON . stringify ( {
207- worktree : { directory : destination } ,
208- plugins : [
209- { package : path . join ( import . meta. dir , "fixture/worktree-plugin" ) , options : { strategy : "target-copy" } } ,
210- ] ,
211- } ) ,
212- )
213- } )
214- const server = yield * startServer ( path . join ( tmp . path , "config" ) )
215- const api = OpenCode . make ( { baseUrl : server . base , headers : server . headers } )
216- yield * Effect . promise ( async ( ) => {
217- await api . location . get ( { location : { directory : source } } )
218- expect ( await api . worktree . list ( { location : { directory : target } } ) ) . toContainEqual ( {
219- directory : path . join ( destination , "delegated" ) ,
220- strategy : "target-copy" ,
221- } )
222- } )
223- } ) ,
224- 30_000 ,
225- )
0 commit comments