fix: ansi terminal tests
This commit is contained in:
parent
9bb396b0f5
commit
7bcfd1a681
1 changed files with 8 additions and 3 deletions
|
|
@ -178,9 +178,14 @@ describe("UnifiedTerminalCommand", () => {
|
|||
expect(container.textContent).toMatch(/Bold text/);
|
||||
expect(container.textContent).toMatch(/Underlined text/);
|
||||
|
||||
// Verify ANSI processing created styled spans
|
||||
const styledSpans = container.querySelectorAll('span[class*="sc-esYiGF"]');
|
||||
expect(styledSpans.length).toBeGreaterThan(0);
|
||||
// Verify ANSI processing created span elements within the code block
|
||||
// The AnsiRenderer creates spans for each ANSI segment
|
||||
const codeElement = container.querySelector("code");
|
||||
expect(codeElement).toBeInTheDocument();
|
||||
|
||||
// Count all spans inside the code element (ANSI creates multiple spans)
|
||||
const spans = codeElement?.querySelectorAll("span");
|
||||
expect(spans?.length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
test("handles links in output", async () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue