Code formatting cleanup.
This commit is contained in:
parent
ca595f19df
commit
77dd84c279
2 changed files with 7 additions and 7 deletions
|
|
@ -59,8 +59,8 @@ function getStrings() {
|
|||
}
|
||||
}
|
||||
|
||||
// Light UI predicates — keep the view thin.
|
||||
function shouldShowClearExitNode(currentExitNode) {
|
||||
// Light UI predicates — keep the view thin.
|
||||
function shouldShowClearExitNode(currentExitNode) {
|
||||
return currentExitNode !== ""
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ test("errorMessage returns generic message for unknown command", () => {
|
|||
assert.strictEqual(msg, "Tailscale command failed")
|
||||
})
|
||||
|
||||
// --- getClipboardCommands (simple array, argv only, per #48 first-principles) ---
|
||||
// --- getClipboardCommands ---
|
||||
|
||||
test("getClipboardCommands returns ordered argv arrays with text appended", () => {
|
||||
const cmds = getClipboardCommands("1.2.3.4")
|
||||
|
|
@ -108,7 +108,7 @@ test("getClipboardCommands is deterministic and open for future tools", () => {
|
|||
assert.ok(Array.isArray(cmds[1]))
|
||||
})
|
||||
|
||||
// --- getStrings (for #34 i18n prep) ---
|
||||
// --- getStrings ---
|
||||
|
||||
test("getStrings returns canonical UI strings for the widget", () => {
|
||||
const s = getStrings()
|
||||
|
|
@ -196,7 +196,7 @@ test("parseStatusResult sets isConnected false for non-Running BackendState", ()
|
|||
assert.strictEqual(state.isConnected, false)
|
||||
})
|
||||
|
||||
// --- formatError (central error + detail formatting per first-principles plan) ---
|
||||
// --- formatError (central error + detail formatting) ---
|
||||
|
||||
test("formatError returns base message without detail", () => {
|
||||
assert.strictEqual(formatError("status"), "Failed to read Tailscale status")
|
||||
|
|
@ -216,7 +216,7 @@ test("formatError handles empty or falsy detail gracefully", () => {
|
|||
assert.strictEqual(formatError("connect", null), "Failed to connect to Tailscale")
|
||||
})
|
||||
|
||||
// --- isValidExitNodeHostname + makeExitNodeCommand safety (balanced paranoia, direct-argv defense-in-depth) ---
|
||||
// --- isValidExitNodeHostname + makeExitNodeCommand safety ---
|
||||
|
||||
test("isValidExitNodeHostname accepts empty string (clear)", () => {
|
||||
assert.strictEqual(isValidExitNodeHostname(""), true)
|
||||
|
|
@ -244,7 +244,7 @@ test("makeExitNodeCommand still produces correct argv for valid input", () => {
|
|||
assert.deepStrictEqual(makeExitNodeCommand("gluetun-sjc"), ["tailscale", "set", "--exit-node=gluetun-sjc"])
|
||||
})
|
||||
|
||||
// --- getStatusCommand (new pure helper for low-duty-cycle architecture) ---
|
||||
// --- getStatusCommand ---
|
||||
|
||||
test("getStatusCommand returns the canonical tailscale status --json argv", () => {
|
||||
const cmd = getStatusCommand()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue