mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-08-28 08:35:57 +00:00
30 lines
856 B
TypeScript
30 lines
856 B
TypeScript
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 },
|
|
]);
|
|
});
|