Skip to content

Commit f8e26a2

Browse files
committed
test: fix Windows list-files cwd assertions
1 parent 26ff2c0 commit f8e26a2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/services/glob/__tests__/list-files.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ describe("list-files symlink support", () => {
120120

121121
const lastArg = args[args.length - 1]
122122
expect(lastArg).toBe(".")
123-
expect(options).toMatchObject({ cwd: testDir })
123+
expect(options).toMatchObject({ cwd: path.resolve(testDir) })
124124
})
125125

126126
it("should include --follow flag for recursive listings too", async () => {
@@ -142,7 +142,7 @@ describe("list-files symlink support", () => {
142142

143143
const lastArg = args[args.length - 1]
144144
expect(lastArg).toBe(".")
145-
expect(options).toMatchObject({ cwd: testDir })
145+
expect(options).toMatchObject({ cwd: path.resolve(testDir) })
146146
})
147147

148148
it("should keep ignored ancestor directories like /tmp from excluding recursive file results", async () => {
@@ -156,7 +156,7 @@ describe("list-files symlink support", () => {
156156
const [, args, options] = mockSpawn.mock.calls[0]
157157
expect(args).toContain("!**/tmp/**")
158158
expect(args[args.length - 1]).toBe(".")
159-
expect(options).toMatchObject({ cwd: testDir })
159+
expect(options).toMatchObject({ cwd: path.resolve(testDir) })
160160
expect(files).toContain(path.join(testDir, "nested", "deep", "deep-nested-file.ts"))
161161
})
162162

0 commit comments

Comments
 (0)