Spawn child processes directly and drop the Deno.Command shim

This commit is contained in:
Danny Kim
2026-10-17 23:15:39 +09:00
parent 60c63dee98
commit a7ca13e4a7
13 changed files with 255 additions and 361 deletions
+5 -5
View File
@@ -17,7 +17,7 @@ test("retries once after an invalid refresh token", async () => {
const result = await retryInvalidToken(
() =>
Promise.resolve({
status: { success: false },
code: 1,
error: attempts++ === 0 ? "ERROR: invalid_refresh_token" : "still failed",
}),
() => {
@@ -40,7 +40,7 @@ test("does not retry an unrelated failure", async () => {
() => {
attempts++;
return Promise.resolve({
status: { success: false },
code: 1,
error: "rate limited",
});
},
@@ -86,7 +86,7 @@ test("re-logs in after the job 9837 revoked-session stderr", async () => {
const result = await retryInvalidToken(
() =>
Promise.resolve({
status: { success: attempts++ > 0 },
code: attempts++ > 0 ? 0 : 1,
error: attempts === 1 ? REVOKED_CODEX.join("\n") : "",
}),
() => {
@@ -95,9 +95,9 @@ test("re-logs in after the job 9837 revoked-session stderr", async () => {
},
);
expect({ relogins, success: result.status.success }).toStrictEqual({
expect({ relogins, code: result.code }).toStrictEqual({
relogins: 1,
success: true,
code: 0,
});
});