11import { Temporal } from "@js-temporal/polyfill" ;
2- import { resolve } from "path" ;
2+ import { join } from "path" ;
33import { afterAll , afterEach , beforeAll , describe , expect , it , vi } from "vitest" ;
44
55/** @type {{ show: import("vitest").MockedFunction<() => Promise<string>>, fetch: import("vitest").MockedFunction<() => Promise<void>> } } */
@@ -170,7 +170,7 @@ describe("detect-arm-leases", () => {
170170
171171 expect ( result ) . toBe ( true ) ;
172172 expect ( mockGitInstance . show ) . toHaveBeenCalledWith ( [
173- `HEAD^:${ resolve ( ".github" , "arm-leases" , "xyz" , "Microsoft.XYZ" , "XYZ" , "lease.yaml" ) } ` ,
173+ `HEAD^:${ join ( ".github" , "arm-leases" , "xyz" , "Microsoft.XYZ" , "XYZ" , "lease.yaml" ) } ` ,
174174 ] ) ;
175175 } ) ;
176176
@@ -181,7 +181,7 @@ describe("detect-arm-leases", () => {
181181
182182 expect ( result ) . toBe ( true ) ;
183183 expect ( mockGitInstance . show ) . toHaveBeenCalledWith ( [
184- `HEAD^:${ resolve ( ".github" , "arm-leases" , "xyz" , "Microsoft.XYZ" , "lease.yaml" ) } ` ,
184+ `HEAD^:${ join ( ".github" , "arm-leases" , "xyz" , "Microsoft.XYZ" , "lease.yaml" ) } ` ,
185185 ] ) ;
186186 } ) ;
187187
@@ -203,10 +203,10 @@ describe("detect-arm-leases", () => {
203203 ] ) ;
204204 expect ( mockGitInstance . show ) . toHaveBeenCalledTimes ( 2 ) ;
205205 expect ( mockGitInstance . show ) . toHaveBeenNthCalledWith ( 1 , [
206- `HEAD^:${ resolve ( ".github" , "arm-leases" , "xyz" , "Microsoft.XYZ" , "XYZInsights" , "lease.yaml" ) } ` ,
206+ `HEAD^:${ join ( ".github" , "arm-leases" , "xyz" , "Microsoft.XYZ" , "XYZInsights" , "lease.yaml" ) } ` ,
207207 ] ) ;
208208 expect ( mockGitInstance . show ) . toHaveBeenNthCalledWith ( 2 , [
209- `origin/main:${ resolve ( ".github" , "arm-leases" , "xyz" , "Microsoft.XYZ" , "XYZInsights" , "lease.yaml" ) } ` ,
209+ `origin/main:${ join ( ".github" , "arm-leases" , "xyz" , "Microsoft.XYZ" , "XYZInsights" , "lease.yaml" ) } ` ,
210210 ] ) ;
211211 } ) ;
212212
0 commit comments