Skip to content

Commit d7521e3

Browse files
committed
use posix paths for tests
1 parent 05da2ac commit d7521e3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/testing/src/setup.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ import { fs, vol } from "memfs";
22
import { type Result, err, ok } from "neverthrow";
33
import { afterEach, expect, vi } from "vitest";
44
import type { LogEntry } from "winston";
5+
import * as posixPath from "node:path/posix";
6+
7+
// Mocking the `path` module to use posix paths for consistency across platforms
8+
vi.mock("node:path", () => ({
9+
...posixPath,
10+
default: posixPath,
11+
}));
512

613
vi.mock("fs", () => ({
714
...fs,

0 commit comments

Comments
 (0)