mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-12-05 08:15:41 -08:00
Make every URL the console page uses page-relative, guarded by a source test
AI Assisted
This commit is contained in:
1 parent
4ced32be5c
commit
1d007737b1
47 files changed
+401
-202
No files matched your search
@@ -121,6 +121,6 @@ test("the page-closed signal is a keepalive fetch, which carries the page's orig
|
||||
const core = fs.readFileSync(path.join(ROOT, "src", "web-console", "public", "screens", "core.js"), "utf8");
|
||||
const wire = core.slice(core.indexOf("export function wireChrome()"));
|
||||
const pagehide = wire.slice(0, wire.indexOf("});"));
|
||||
assert.match(pagehide, /fetch\("\/bye", \{ method: "POST", keepalive: true \}\)/, pagehide);
|
||||
assert.match(pagehide, /fetch\("bye", \{ method: "POST", keepalive: true \}\)/, pagehide);
|
||||
assert.doesNotMatch(core, /navigator\.sendBeacon\(/, "no beacon call left anywhere in the page's core");
|
||||
});
|
||||
Reference in new issue
Block a user