fix: type issues from esm
This commit is contained in:
@@ -58,7 +58,7 @@ describe("issue #912 — github-copilot abort propagation", () => {
|
||||
// signal — this is the regression vector. Real Bun fetch normally
|
||||
// propagates abort to the body reader, but we cannot rely on it for
|
||||
// every transport (HTTP/2, intermediaries, native sockets).
|
||||
global.fetch = (async (input: RequestInfo | URL, _init?: RequestInit): Promise<Response> => {
|
||||
global.fetch = (async (input: string | URL | Request, _init?: RequestInit): Promise<Response> => {
|
||||
const url = typeof input === "string" ? input : input instanceof URL ? input.href : input.url;
|
||||
if (!url.endsWith("/responses")) {
|
||||
throw new Error(`Unexpected fetch to ${url}`);
|
||||
|
||||
@@ -57,8 +57,10 @@ describe("issue 892: pi-natives public surface", () => {
|
||||
// Mirror the failing consumer's package import (packages/utils/src/procmgr.ts,
|
||||
// packages/coding-agent/src/tools/browser/attach.ts).
|
||||
const mod = await import("@oh-my-pi/pi-natives");
|
||||
expect(mod.ProcessStatus).toBeDefined();
|
||||
expect(mod.ProcessStatus.Running).toBe("running");
|
||||
expect(mod.ProcessStatus.Exited).toBe("exited");
|
||||
const processStatusValues: Record<"Running" | "Exited", string> = {
|
||||
Running: mod.ProcessStatus.Running,
|
||||
Exited: mod.ProcessStatus.Exited,
|
||||
};
|
||||
expect(processStatusValues).toEqual({ Running: "running", Exited: "exited" });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user