mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-07 10:45:59 -10:00
fix(studio): two errors vitest counts as a failed run no longer escape: the image viewer's test supplies the pointer capture jsdom lacks, and the tool output's measuring frame skips an animation query the environment does not have
This commit is contained in:
1 parent
abeb6b1b36
commit
7586f9e785
2 files changed
+4
-2
No files matched your search
@@ -298,7 +298,7 @@ function Clip({ id, deps, children }: { id?: string; deps?: unknown; children: R
|
||||
// Collapsing now takes time, and mid-transition this measures an intermediate
|
||||
// height — at that instant the test flips to "not overflowing" and pulls the
|
||||
// expand button. While one is running, wait for it to settle.
|
||||
if (!el.getAnimations().length) measure();
|
||||
if (!el.getAnimations?.().length) measure();
|
||||
});
|
||||
el.addEventListener("transitionend", measure);
|
||||
return () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// @vitest-environment jsdom
|
||||
import "./testkit";
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { cleanup, fireEvent, render, screen, waitFor, within } from "@testing-library/react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { UserCard } from "./cards/UserCard";
|
||||
@@ -12,6 +12,8 @@ import type { AgentPort, SessionStatus } from "../port/port";
|
||||
|
||||
Element.prototype.getAnimations ??= () => [];
|
||||
|
||||
// jsdom has no pointer capture, which the viewer takes when a drag starts.
|
||||
beforeEach(() => { HTMLElement.prototype.setPointerCapture = vi.fn(); });
|
||||
afterEach(() => { cleanup(); vi.restoreAllMocks(); });
|
||||
|
||||
const path = ".reasonix/attachments/preview.png";
|
||||
|
||||
Reference in new issue
Block a user