fix(TerminalModal): remove incorrect loadAddon assertion in mobile WebGL test
The test was checking that loadAddon was never called with any object, but fitAddon and webLinksAddon are both objects that are legitimately loaded. The WebglAddon constructor check is sufficient to verify that WebGL is not loaded on mobile.
This commit is contained in:
@@ -926,7 +926,6 @@ describe("TerminalModal", () => {
|
||||
|
||||
// Import WebGL addon mock to get reference for assertions
|
||||
const webglModule = await import("@xterm/addon-webgl");
|
||||
const loadAddonSpy = vi.spyOn(mockTerminalInstance, "loadAddon");
|
||||
|
||||
render(<TerminalModal isOpen={true} onClose={mockOnClose} />);
|
||||
|
||||
@@ -938,8 +937,8 @@ describe("TerminalModal", () => {
|
||||
// WebGL addon constructor should NOT have been called
|
||||
expect(webglModule.WebglAddon).not.toHaveBeenCalled();
|
||||
|
||||
// loadAddon should NOT have been called with WebGL addon
|
||||
expect(loadAddonSpy).not.toHaveBeenCalledWith(expect.any(Object));
|
||||
// loadAddon is called with fitAddon and webLinksAddon (not WebGL) — verified by
|
||||
// the WebglAddon constructor not being called above
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user