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
159 await runner.ensureStarted();159 await runner.ensureStarted();
160 const pid = runner.pid();160 const pid = runner.pid();
161 expect(pid).toEqual(expect.any(Number));161 expect(pid).toEqual(expect.any(Number));
162 if (pid === undefined) throw new Error("workerd pid was unavailable");
162 await runner.dispose();163 await runner.dispose();
163 expect(await waitUntilGone(pid as number)).toBe(true);164 expect(await waitUntilGone(pid)).toBe(true);
164 });165 });
165 166
166 it("restarts after a crash", async () => {167 it("restarts after a crash", async () => {
@@ -169,8 +170,9 @@ describe.skipIf(!isWorkerdAvailable())("runtime-workerd-subprocess", () => { · 2 unmodified lines
169 await runner.ensureStarted();170 await runner.ensureStarted();
170 const firstPid = runner.pid();171 const firstPid = runner.pid();
171 expect(firstPid).toEqual(expect.any(Number));172 expect(firstPid).toEqual(expect.any(Number));
173 if (firstPid === undefined) throw new Error("workerd pid was unavailable");
172 runner.crashForTest();174 runner.crashForTest();
173 expect(await waitUntilGone(firstPid as number)).toBe(true);175 expect(await waitUntilGone(firstPid)).toBe(true);
174 const output = await runner.run<{ value: string }>({ op: "echo", value: "after" });176 const output = await runner.run<{ value: string }>({ op: "echo", value: "after" });
175 expect(output.body.value).toBe("after");177 expect(output.body.value).toBe("after");
176 expect(runner.pid()).not.toBe(firstPid);178 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