diff --git a/test/lib.test.js b/test/lib.test.js index dada9e4..cb64f07 100644 --- a/test/lib.test.js +++ b/test/lib.test.js @@ -3,6 +3,19 @@ import assert from "node:assert" import lib from "../tailscalectl/lib.js" const { parsePeers, makeExitNodeCommand, findActiveExitNode, errorMessage, validateClipboardTool, buildCopyCommand, nextClipboardTool, allClipboardTools, buildToggleCommand, parseStatusResult, getStrings, shouldShowClearExitNode, isActiveExitNode } = lib +/* + * Test coverage note for #48: + * All pure functions exported from lib.js (including the newly extracted + * getStrings, shouldShowClearExitNode, isActiveExitNode, and the clipboard + * helpers) are exercised here via node:test. + * + * The four Process objects, 5-second Timer, onExited handlers, copy fallback + * state machine, and overall widget behavior in TailscaleWidget.qml have no + * automated test coverage. There is no QML test runner in this project. + * Those paths are verified manually (see verification checklist in the + * feature branch commits). + */ + test("parsePeers extracts exitNode from ExitNodeOption", () => { const peerMap = { "peer-1": {