mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 04:45:33 -08:00
Update the prototypes and state tests for the Prototypes tab (match native realpath, add the prototypes state entry)
AI Assisted
This commit is contained in:
1 parent
f715e469ef
commit
66fd2f71a1
2 files changed
+3
-1
No files matched your search
@@ -82,7 +82,8 @@ test("prototypeHtmlPath names one .html in prototypes/ and refuses everything el
|
||||
});
|
||||
try {
|
||||
const found = await prototypeHtmlPath(root, SPEC, "picker.html");
|
||||
assert.equal(found, fs.realpathSync(path.join(root, SPEC, "prototypes", "picker.html")));
|
||||
// fs.promises.realpath is the native one, which spells out an 8.3 short temp path.
|
||||
assert.equal(found, fs.realpathSync.native(path.join(root, SPEC, "prototypes", "picker.html")));
|
||||
const refused = ["picker.md", "../../../secret.html", "missing.html", path.join(base, "secret.html"), "picker.html.exe", "", undefined];
|
||||
for (const name of refused) assert.equal(await prototypeHtmlPath(root, SPEC, name), null, String(name));
|
||||
} finally {
|
||||
|
||||
@@ -57,6 +57,7 @@ test("state: the rest of the shared state starts as app.js always started it", (
|
||||
loopAction: null,
|
||||
subagentsFrame: null,
|
||||
overview: { key: null, files: {} },
|
||||
prototypes: { key: null, files: [], open: null, texts: {} },
|
||||
wake: null,
|
||||
dashPick: null,
|
||||
mentionPop: null,
|
||||
|
||||
Reference in new issue
Block a user