F12: inline editable proposed-change diff in the Markdown editor + Accept/Reject control parity (#64) (#66)
This commit was merged in pull request #66.
This commit is contained in:
+12
-2
@@ -13,11 +13,20 @@ async function main(): Promise<void> {
|
||||
const workspace = fs.mkdtempSync(path.join(os.tmpdir(), "cowriting-e2e-"));
|
||||
fs.cpSync(fixture, workspace, { recursive: true });
|
||||
|
||||
// VS Code derives its IPC socket path from --user-data-dir. The default
|
||||
// (`<projectRoot>/.vscode-test/user-data`) plus `/<version>-main.sock` can blow
|
||||
// past macOS's ~103-char UNIX-socket limit (`listen EINVAL`) when the project
|
||||
// lives at a long path (e.g. a git worktree). Pin the user-data dir to a SHORT
|
||||
// root under /tmp so the socket path stays well under the limit. (os.tmpdir() on
|
||||
// macOS is itself a long /var/folders/… path, so we use /tmp directly.)
|
||||
const userDataRoot = process.platform === "win32" ? os.tmpdir() : "/tmp";
|
||||
const userDataDir = fs.mkdtempSync(path.join(userDataRoot, "cwud-"));
|
||||
|
||||
try {
|
||||
await runTests({
|
||||
extensionDevelopmentPath,
|
||||
extensionTestsPath,
|
||||
launchArgs: [workspace, "--disable-extensions"],
|
||||
launchArgs: [workspace, "--disable-extensions", "--user-data-dir", userDataDir],
|
||||
extensionTestsEnv: { E2E_WORKSPACE: workspace },
|
||||
});
|
||||
|
||||
@@ -26,10 +35,11 @@ async function main(): Promise<void> {
|
||||
await runTests({
|
||||
extensionDevelopmentPath,
|
||||
extensionTestsPath: path.resolve(__dirname, "./suite-no-workspace/index"),
|
||||
launchArgs: ["--disable-extensions"],
|
||||
launchArgs: ["--disable-extensions", "--user-data-dir", userDataDir],
|
||||
});
|
||||
} finally {
|
||||
fs.rmSync(workspace, { recursive: true, force: true });
|
||||
fs.rmSync(userDataDir, { recursive: true, force: true });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user