mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 08:01:23 +00:00
fix: clarify auth order exclusions
This commit is contained in:
@@ -85,6 +85,31 @@ describe("renderTable", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("resets ANSI styling on wrapped lines", () => {
|
||||
const reset = "\x1b[0m";
|
||||
const out = renderTable({
|
||||
width: 24,
|
||||
columns: [
|
||||
{ key: "K", header: "K", minWidth: 3 },
|
||||
{ key: "V", header: "V", flex: true, minWidth: 10 },
|
||||
],
|
||||
rows: [
|
||||
{
|
||||
K: "X",
|
||||
V: `\x1b[31m${"a".repeat(80)}${reset}`,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const lines = out.split("\n").filter((line) => line.includes("a"));
|
||||
for (const line of lines) {
|
||||
const resetIndex = line.lastIndexOf(reset);
|
||||
const lastSep = line.lastIndexOf("│");
|
||||
expect(resetIndex).toBeGreaterThan(-1);
|
||||
expect(lastSep).toBeGreaterThan(resetIndex);
|
||||
}
|
||||
});
|
||||
|
||||
it("respects explicit newlines in cell values", () => {
|
||||
const out = renderTable({
|
||||
width: 48,
|
||||
|
||||
Reference in New Issue
Block a user