Skip to content

Commit 6ebc30d

Browse files
authored
Merge pull request #17 from tejaswiMinnu/main
new changes
2 parents 0376333 + d14f44b commit 6ebc30d

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/src/arm-modeling-review/detect-arm-leases.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { resolve } from "path";
1+
import { join } from "path";
22
import { Temporal } from "@js-temporal/polyfill";
33
import yaml from "js-yaml";
44
import { simpleGit } from "simple-git";
@@ -43,9 +43,9 @@ const leaseSchema = z.object({
4343
*/
4444
function buildLeaseRelativePath(orgName, rpNamespace, serviceName = "") {
4545
if (serviceName) {
46-
return resolve(".github", "arm-leases", orgName, rpNamespace, serviceName, "lease.yaml");
46+
return join(".github", "arm-leases", orgName, rpNamespace, serviceName, "lease.yaml");
4747
}
48-
return resolve(".github", "arm-leases", orgName, rpNamespace, "lease.yaml");
48+
return join(".github", "arm-leases", orgName, rpNamespace, "lease.yaml");
4949
}
5050

5151
/**

.github/workflows/test/arm-modeling-review/detect-arm-leases.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Temporal } from "@js-temporal/polyfill";
2-
import { resolve } from "path";
2+
import { join } from "path";
33
import { 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

Comments
 (0)