auto-git:
[change] tests/unit/camera-rig-inspector.integration.test.tsx
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
|
import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";
|
||||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
const { MockViewportHost, viewportHostInstances } = vi.hoisted(() => {
|
const { MockViewportHost, viewportHostInstances } = vi.hoisted(() => {
|
||||||
@@ -93,13 +93,14 @@ describe("Camera Rig inspector", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
cleanup();
|
||||||
vi.restoreAllMocks();
|
vi.restoreAllMocks();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("creates a camera rig from the Add menu and persists fixed-rig inspector edits", async () => {
|
it("creates a camera rig from the Add menu and persists fixed-rig inspector edits", async () => {
|
||||||
const store = createEditorStore();
|
const store = createEditorStore();
|
||||||
|
|
||||||
render(<App store={store} />);
|
const { unmount } = render(<App store={store} />);
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(viewportHostInstances.length).toBeGreaterThan(0);
|
expect(viewportHostInstances.length).toBeGreaterThan(0);
|
||||||
@@ -188,5 +189,7 @@ describe("Camera Rig inspector", () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
unmount();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user