@@ -19,10 +19,6 @@ afterEach(async () => {
1919 await rm ( root , { recursive : true , force : true } ) ;
2020} ) ;
2121
22- function initGitRepo ( dir : string ) : void {
23- initTemporaryGitRepo ( dir ) ;
24- }
25-
2622async function commitReadme ( dir : string ) : Promise < void > {
2723 await writeFile ( join ( dir , "README" ) , "x" ) ;
2824 execFileSync ( "git" , [ "add" , "README" ] , { cwd : dir , stdio : "ignore" } ) ;
@@ -37,7 +33,7 @@ test("projectKeyFor is stable across calls for the same path", () => {
3733} ) ;
3834
3935test ( "projectKeyFor shares nested dirs under the same git toplevel" , async ( ) => {
40- initGitRepo ( root ) ;
36+ initTemporaryGitRepo ( root ) ;
4137 await commitReadme ( root ) ;
4238
4339 const nested = join ( root , "nested" , "deep" ) ;
@@ -48,7 +44,7 @@ test("projectKeyFor shares nested dirs under the same git toplevel", async () =>
4844} ) ;
4945
5046test ( "linked worktrees have distinct project roots and keys from main and each other" , async ( ) => {
51- initGitRepo ( root ) ;
47+ initTemporaryGitRepo ( root ) ;
5248 await commitReadme ( root ) ;
5349
5450 const wtA = join ( root , ".." , `wt-a-${ Date . now ( ) } -${ Math . random ( ) . toString ( 16 ) . slice ( 2 ) } ` ) ;
0 commit comments