Fix ToastContext test flake (#34045)

* Fix ToastContext test flake

* remove import
This commit is contained in:
Will Hunt
2026-06-30 09:59:50 +00:00
committed by GitHub
parent 1aa86110e2
commit 5374ae2b53
@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
*/
import { describe, it, expect, vitest } from "vitest";
import { render, waitFor } from "@testing-library/react";
import { render } from "@testing-library/react";
import { Toast } from "@vector-im/compound-web";
import React, { type JSX } from "react";
@@ -61,8 +61,6 @@ describe("useToastContext", () => {
<HappyComponent />
</ToastContext>,
);
await waitFor(() => {
expect(getByText("Toast!")).toBeInViewport();
});
expect(getByText("Toast!")).toBeVisible();
});
});