修复窗口标题栏测试隔离
每个窗口测试结束后清理 DOM 挂载
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// @vitest-environment jsdom
|
||||
|
||||
import { fireEvent, render, screen } from '@testing-library/react';
|
||||
import { cleanup, fireEvent, render, screen } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { APP_NAME } from '../src/app/appMetadata';
|
||||
import type { GameCreatorDirectActiveTurn } from '../src/app/types';
|
||||
@@ -50,6 +50,8 @@ function ActiveRunsSetter({
|
||||
}
|
||||
|
||||
describe('WindowChrome', () => {
|
||||
afterEach(cleanup);
|
||||
|
||||
beforeEach(() => {
|
||||
nativeWindow.minimize.mockReset();
|
||||
nativeWindow.toggleMaximize.mockReset();
|
||||
|
||||
Reference in New Issue
Block a user