diff options
| author | Luke Parker <[email protected]> | 2026-02-24 20:07:56 +1000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-24 20:07:56 +1000 |
| commit | de796d9a00544001fe196d9a3068ea241165293a (patch) | |
| tree | 5ec822bbfe60d71c079652d8726006c93c83d3f0 | |
| parent | a592bd968454f0b8c55733f7a8df85e38a293de5 (diff) | |
| download | opencode-de796d9a00544001fe196d9a3068ea241165293a.tar.gz opencode-de796d9a00544001fe196d9a3068ea241165293a.zip | |
fix(test): use path.join for cross-platform glob test assertions (#14837)
| -rw-r--r-- | packages/opencode/test/util/glob.test.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/opencode/test/util/glob.test.ts b/packages/opencode/test/util/glob.test.ts index ae1bcdcf8..e58d92c85 100644 --- a/packages/opencode/test/util/glob.test.ts +++ b/packages/opencode/test/util/glob.test.ts @@ -63,7 +63,7 @@ describe("Glob", () => { const results = await Glob.scan("**/*.txt", { cwd: tmp.path }) - expect(results).toEqual(["nested/deep.txt"]) + expect(results).toEqual([path.join("nested", "deep.txt")]) }) test("returns empty array for no matches", async () => { @@ -82,7 +82,7 @@ describe("Glob", () => { const results = await Glob.scan("**/*.txt", { cwd: tmp.path }) - expect(results).toEqual(["realdir/file.txt"]) + expect(results).toEqual([path.join("realdir", "file.txt")]) }) test("follows symlinks when symlink option is true", async () => { @@ -93,7 +93,7 @@ describe("Glob", () => { const results = await Glob.scan("**/*.txt", { cwd: tmp.path, symlink: true }) - expect(results.sort()).toEqual(["linkdir/file.txt", "realdir/file.txt"]) + expect(results.sort()).toEqual([path.join("linkdir", "file.txt"), path.join("realdir", "file.txt")]) }) test("includes dotfiles when dot option is true", async () => { |
