mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-18 05:19:29 +08:00
- Normalize Windows paths passed through the TS7 virtual filesystem. - Emit and launch .exe outputs by default on Windows. - Add targeted regressions and a Windows GitHub Actions smoke test. Co-authored-by: Khaled Ghallab <171967089+Khaled-Ghallab@users.noreply.github.com>
17 lines
688 B
TypeScript
17 lines
688 B
TypeScript
import { describe, expect, test } from "vitest";
|
|
import { tsgoPath } from "../../src/frontend/shared.js";
|
|
|
|
describe("tsgo virtual filesystem paths", () => {
|
|
test("matches slash-normalized Windows callback paths", () => {
|
|
expect(tsgoPath("C:\\Users\\Alice\\project\\tsconfig.json", "win32"))
|
|
.toBe("C:/Users/Alice/project/tsconfig.json");
|
|
expect(tsgoPath("C:/Users/Alice/project/tsconfig.json", "win32"))
|
|
.toBe("C:/Users/Alice/project/tsconfig.json");
|
|
});
|
|
|
|
test("preserves backslashes that are literal POSIX filename characters", () => {
|
|
expect(tsgoPath("/tmp/project\\name/tsconfig.json", "linux"))
|
|
.toBe("/tmp/project\\name/tsconfig.json");
|
|
});
|
|
});
|