mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 12:56:01 -06:00
test(terminal): remove duplicate display-string table case (#129903)
Amp-Thread-ID: https://ampcode.com/threads/T-01a037b5-3918-749f-90bd-5c9ac1dced16 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
committed by
GitHub
parent
7ac0e26bce
commit
649f7018e0
@@ -85,24 +85,6 @@ describe("renderTable", () => {
|
||||
expect(segment).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it.each(["$&", "$`", "$'", "$$"])(
|
||||
"displays a literal %s home path in terminal tables",
|
||||
(pattern) => {
|
||||
const home = path.resolve("test-home", `${pattern}user`);
|
||||
vi.stubEnv("HOME", home);
|
||||
vi.stubEnv("USERPROFILE", "");
|
||||
vi.stubEnv("OPENCLAW_HOME", "~/state");
|
||||
|
||||
expect(
|
||||
renderTable({
|
||||
columns: [{ key: "location", header: "Location" }],
|
||||
rows: [{ location: `${home}/state/project` }],
|
||||
border: "none",
|
||||
}),
|
||||
).toBe("Location\n$OPENCLAW_HOME/project\n");
|
||||
},
|
||||
);
|
||||
|
||||
it("prefers shrinking flex columns to avoid wrapping non-flex labels", () => {
|
||||
const out = renderTable({
|
||||
width: 40,
|
||||
|
||||
Reference in New Issue
Block a user