Extract shell logic into modules Node can test #9
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
11.7k lines of QML and no .js: the least testable part of the
system.
Omarchy keeps plugin logic in plain .js ending in a guarded
module.exports, so QML imports it and Node unit-tests it without a
compositor. FuzzyMatch, LuaTable, NotificationRules, Levels and
WorkspaceSnapshot are pure functions wearing a QML costume.
FuzzyMatch, LuaTable, NotificationRules, Levels and WorkspaceSnapshot each keep their Quickshell singleton as a facade over a plain QtObject in services/logic that imports nothing but QtQuick. Ranking, LuaLiteral, NotificationMatch, VolumeCurve and WorkspaceFacts.
Tested with Qt Quick Test rather than Node: ./test/qml runs the tst_*.qml cases through qmltestrunner-qt6 headless, so no compositor is involved and nothing opens on screen. 50 cases passing.
Writing them turned up a real bug: LuaLiteral wrote a JavaScript null straight into a Lua table literal. It writes nil now.
Landed in
cf4cbc5. Note that Levels.wordFor, Levels.readout and Levels.volumeWords have no caller anywhere in the shell; they are covered rather than deleted, but they either want wiring up or removing.