mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-08-28 08:35:57 +00:00
feat: show fast mode in minimal footer
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
|
||||
import { collectFooterStatusItems, FAST_MODE_STATUS_KEY } from "../status.ts";
|
||||
|
||||
test("renders enabled Codex Fast mode as an explicit accented segment", () => {
|
||||
const items = collectFooterStatusItems(new Map([[FAST_MODE_STATUS_KEY, "on"]]));
|
||||
|
||||
assert.deepEqual(items, [{ text: "Fast on", accent: true }]);
|
||||
});
|
||||
|
||||
test("hides disabled Codex Fast mode", () => {
|
||||
const items = collectFooterStatusItems(new Map([[FAST_MODE_STATUS_KEY, "off"]]));
|
||||
|
||||
assert.deepEqual(items, []);
|
||||
});
|
||||
|
||||
test("preserves other non-empty extension statuses", () => {
|
||||
const items = collectFooterStatusItems(new Map([
|
||||
["one", "Ready"],
|
||||
["empty", " "],
|
||||
["two", "2 tasks"],
|
||||
]));
|
||||
|
||||
assert.deepEqual(items, [
|
||||
{ text: "Ready", accent: false },
|
||||
{ text: "2 tasks", accent: false },
|
||||
]);
|
||||
});
|
||||
Reference in New Issue
Block a user