Skip to content

Commit de796d9

Browse files
authored
fix(test): use path.join for cross-platform glob test assertions (anomalyco#14837)
1 parent a592bd9 commit de796d9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/opencode/test/util/glob.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ describe("Glob", () => {
6363

6464
const results = await Glob.scan("**/*.txt", { cwd: tmp.path })
6565

66-
expect(results).toEqual(["nested/deep.txt"])
66+
expect(results).toEqual([path.join("nested", "deep.txt")])
6767
})
6868

6969
test("returns empty array for no matches", async () => {
@@ -82,7 +82,7 @@ describe("Glob", () => {
8282

8383
const results = await Glob.scan("**/*.txt", { cwd: tmp.path })
8484

85-
expect(results).toEqual(["realdir/file.txt"])
85+
expect(results).toEqual([path.join("realdir", "file.txt")])
8686
})
8787

8888
test("follows symlinks when symlink option is true", async () => {
@@ -93,7 +93,7 @@ describe("Glob", () => {
9393

9494
const results = await Glob.scan("**/*.txt", { cwd: tmp.path, symlink: true })
9595

96-
expect(results.sort()).toEqual(["linkdir/file.txt", "realdir/file.txt"])
96+
expect(results.sort()).toEqual([path.join("linkdir", "file.txt"), path.join("realdir", "file.txt")])
9797
})
9898

9999
test("includes dotfiles when dot option is true", async () => {

0 commit comments

Comments
 (0)