Skip to content

Commit c7081f0

Browse files
committed
test: forward-slash the header when asserting --tree target paths
Artifacts now live under os.tmpdir(), so on Windows the tree header is an absolute C:\...\ path (backslashes, and the RUNNER~1 short name doesn't match homedir), which the fwd(target) comparison missed. Normalize the header with fwd() too so the path assertion is separator-agnostic.
1 parent a0646e1 commit c7081f0

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tests/cli.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,7 @@ describe("--tree output", () => {
15301530
])
15311531
expect(exitCode).toBe(0)
15321532
const { header, tree } = parseTreeOutput(output)
1533-
expect(header).toContain(fwd(t))
1533+
expect(fwd(header)).toContain(fwd(t))
15341534
expect(tree).toBe(TREE_FOLDER)
15351535
}, 30000)
15361536

@@ -1539,7 +1539,7 @@ describe("--tree output", () => {
15391539
const { output, exitCode } = await run(["clone", "nrjdalal/picksuite", t, "--tree"])
15401540
expect(exitCode).toBe(0)
15411541
const { header, tree } = parseTreeOutput(output)
1542-
expect(header).toContain(fwd(t))
1542+
expect(fwd(header)).toContain(fwd(t))
15431543
expect(tree).toBe(TREE_REPO_MAIN)
15441544
}, 30000)
15451545

@@ -1561,7 +1561,7 @@ describe("--tree output", () => {
15611561
])
15621562
expect(exitCode).toBe(0)
15631563
const { header, tree } = parseTreeOutput(output)
1564-
expect(header).toContain(fwd(t))
1564+
expect(fwd(header)).toContain(fwd(t))
15651565
expect(tree).toBe(TREE_FOLDER)
15661566
expect(existsSync(resolve(t))).toBe(false)
15671567
}, 30000)
@@ -1571,7 +1571,7 @@ describe("--tree output", () => {
15711571
const { output, exitCode } = await run(["nrjdalal/picksuite", t, "--dry-run", "--tree"])
15721572
expect(exitCode).toBe(0)
15731573
const { header, tree } = parseTreeOutput(output)
1574-
expect(header).toContain(fwd(t))
1574+
expect(fwd(header)).toContain(fwd(t))
15751575
expect(tree).toBe(TREE_REPO_MAIN)
15761576
}, 30000)
15771577

@@ -1606,7 +1606,7 @@ describe("--tree output", () => {
16061606
])
16071607
expect(exitCode).toBe(0)
16081608
const { header, tree } = parseTreeOutput(output)
1609-
expect(header).toContain(fwd(join(ARTIFACTS, "cli")))
1609+
expect(fwd(header)).toContain(fwd(join(ARTIFACTS, "cli")))
16101610
expect(tree).toBe("└── file.txt")
16111611
}, 30000)
16121612

@@ -1620,7 +1620,7 @@ describe("--tree output", () => {
16201620
])
16211621
expect(exitCode).toBe(0)
16221622
const { header, tree } = parseTreeOutput(output)
1623-
expect(header).toContain(fwd(join(ARTIFACTS, "cli")))
1623+
expect(fwd(header)).toContain(fwd(join(ARTIFACTS, "cli")))
16241624
expect(tree).toBe("└── file.txt")
16251625
}, 30000)
16261626
})

0 commit comments

Comments
 (0)