Skip to content

armgit / qm

Public Imported from GitHub
0

Multiplayer agent harness for work.

test: assert the shell's portal origin by exact value

Regan Belld550d9901f41
diff --git a/test/deploy-app-shell.test.ts b/test/deploy-app-shell.test.ts
index 999ed40a0..b5c2d8639 100644
--- a/test/deploy-app-shell.test.ts
+++ b/test/deploy-app-shell.test.ts
@@ -128,7 +128,8 @@ test("app shell: a valid owner link becomes a host-only cookie and turns on the
assert.equal(page.status, 200);
assert.match(page.body, /__qmAppShell/, "the owner's top-level document load gets the shell");
assert.match(page.body, /<iframe id="app" src="\/"/, "the app renders inside a same-origin frame");
- assert.ok(page.body.includes(PORTAL), "the chat column knows the portal origin");
+ const portalLine = page.body.match(/const portal = (".*?");/)?.[1];
+ assert.equal(portalLine && JSON.parse(portalLine), PORTAL, "the chat column knows the portal origin");
assert.doesNotMatch(page.body, /APP<\/body>/, "the shell is served without touching the upstream");
} finally {
await f.close();