History

Fix workerd runtime package checks

Rhys Sullivan committed 4 months ago

Commit 8b77c751 parent a2f98952 files · +5 −2Browse files

Unified · Split

2 files
  1. packages/kernel/runtime-workerd-subprocess/CHANGELOG.md +1 −0
  2. packages/kernel/runtime-workerd-subprocess/src/index.test.ts +4 −2
packages/kernel/runtime-workerd-subprocess/CHANGELOG.md+1−0
@@ -0,0 +1 @@
1+# @executor-js/runtime-workerd-subprocess
packages/kernel/runtime-workerd-subprocess/src/index.test.ts+4−2
@@ -159,8 +159,9 @@ describe.skipIf(!isWorkerdAvailable())("runtime-workerd-subprocess", () => { · 158 unmodified lines
159159 await runner.ensureStarted();
160160 const pid = runner.pid();
161161 expect(pid).toEqual(expect.any(Number));
162+ if (pid === undefined) throw new Error("workerd pid was unavailable");
162163 await runner.dispose();
163− expect(await waitUntilGone(pid as number)).toBe(true);
164+ expect(await waitUntilGone(pid)).toBe(true);
164165 });
165166
166167 it("restarts after a crash", async () => {
@@ -169,8 +170,9 @@ describe.skipIf(!isWorkerdAvailable())("runtime-workerd-subprocess", () => { · 2 unmodified lines
169170 await runner.ensureStarted();
170171 const firstPid = runner.pid();
171172 expect(firstPid).toEqual(expect.any(Number));
173+ if (firstPid === undefined) throw new Error("workerd pid was unavailable");
172174 runner.crashForTest();
173− expect(await waitUntilGone(firstPid as number)).toBe(true);
175+ expect(await waitUntilGone(firstPid)).toBe(true);
174176 const output = await runner.run<{ value: string }>({ op: "echo", value: "after" });
175177 expect(output.body.value).toBe("after");
176178 expect(runner.pid()).not.toBe(firstPid);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t