The C1 fix (a45db52a) shipped with no committed test: the defect lives in
js/, and this repo has no JavaScript test surface - no package.json, no
eslint config, no tsconfig - so nothing in CI could notice a reinstatement
of the false "default channel" message. ruff covers only Python.
Rather than add a JS toolchain, the guard shells out to `node` and drives
the SHIPPED client modules (CustomNodesManager.installNodes,
uninstallNodes) through a stubbed 404, then reads the string that reached
app.ui.dialog.show() - the sink the user actually reads. Only the network
and the browser are stood in for; the client code that runs is the real
file, reached through a symlink under --preserve-symlinks so nothing is
copied.
The same predicate runs against both arms, so this is a guard rather than
a tautology: it must pass on the current client and FAIL on the client as
it was at 14de6304, on the false lead specifically. Verified by mutation
too - reinstating either 404 branch turns both GREEN nodes red.
Every node skips with a reason when `node` is absent, so a node-less
runner is not broken by this file.
17 lines
516 B
JavaScript
17 lines
516 B
JavaScript
// Stand-in for ComfyUI's `scripts/app.js`, for tests/test_batch_404_dialog_guard.py.
|
|
//
|
|
// `app.ui.dialog.show()` is the sink the manager's error text actually reaches
|
|
// in the browser, so it is what the guard measures: every call is recorded and
|
|
// the harness prints what the user would have been shown.
|
|
export const shown = [];
|
|
export const app = {
|
|
ui: {
|
|
dialog: {
|
|
show(msg) { shown.push(msg); },
|
|
element: { style: {} },
|
|
},
|
|
},
|
|
extensionManager: { toast: { add() {} } },
|
|
registerExtension() {},
|
|
};
|