test(panel): 加组件测试与浏览器冒烟、hooks lint、OpenAPI 双向类型对齐,修复 CI 类型检查空转、列表不显示服务器名称与玩家停服不确认
This commit is contained in:
44 files changed
+10578
-216
No files matched your search
@@ -1,4 +1,14 @@
|
||||
import { afterEach } from "vitest";
|
||||
import i18next from "i18next";
|
||||
import "./src/i18n";
|
||||
|
||||
i18next.changeLanguage("en-US");
|
||||
|
||||
// Component tests opt into jsdom per file (`// @vitest-environment jsdom`);
|
||||
// the lib tests stay on node. Testing Library only unmounts between tests on
|
||||
// its own when vitest globals are on, so do it here, and only where a DOM exists.
|
||||
afterEach(async () => {
|
||||
if (typeof document === "undefined") return;
|
||||
const { cleanup } = await import("@testing-library/react");
|
||||
cleanup();
|
||||
});
|
||||
Reference in new issue
Block a user