mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-12-05 16:15:41 -08:00
Trim comments and docs to what the code needs
AI Assisted
This commit is contained in:
1 parent
eba3c3bf0c
commit
0bd721fc27
33 files changed
+292
-392
No files matched your search
@@ -2355,8 +2355,8 @@ test("picker: the workspace picker cannot drift from the launcher's", () => {
|
||||
});
|
||||
|
||||
test("picker: the launcher and the workspace read a picker's exit the same way", () => {
|
||||
// Two copies of one rule (macOS: only osascript's (-128) is a cancel), each
|
||||
// with its own tests: this keeps an edit to one from leaving the other behind.
|
||||
// One rule in two places (macOS: only osascript's (-128) is a cancel); this
|
||||
// keeps an edit to one from leaving the other behind.
|
||||
const { pickerCancelled } = createRequire(import.meta.url)(path.join(ROOT, "src", "launcher", "plan2code.js"));
|
||||
const errors = ["", "0:17: execution error: User canceled. (-128)", "execution error: Not authorized to send Apple events. (-1743)", "(-1280)", "Gtk-WARNING\n"];
|
||||
for (const platform of ["darwin", "linux", "win32"]) {
|
||||
@@ -2405,7 +2405,7 @@ function fakeSpawn(code, output, errorText = "", platform = process.platform) {
|
||||
}
|
||||
|
||||
// What osascript prints on a cancel, and on a failure (a bad script here; a
|
||||
// missing default folder or a refused permission end the same way, exit 1).
|
||||
// missing default folder or a refused permission also exit 1).
|
||||
const MAC_CANCEL = "0:17: execution error: User canceled. (-128)\n";
|
||||
const MAC_FAILURE = "0:4: execution error: The variable this is not defined. (-2753)\n";
|
||||
|
||||
@@ -2786,8 +2786,7 @@ test("initialWorkspace names the original folder after itself and marks it origi
|
||||
assert.deepEqual([ws.missing, ws.changes, ws.remote], [[], [], ""]);
|
||||
});
|
||||
|
||||
// Browse... opens beside the last folder added. When that folder is gone, a missing
|
||||
// start must not read as "Browse is not available here".
|
||||
// A start deleted on disk must not read as "Browse is not available here".
|
||||
test("pickerStart opens beside the last folder added, or at its nearest folder still on disk", () => {
|
||||
const root = fs.mkdtempSync(path.join(os.tmpdir(), "p2c-picker-start-"));
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user