Fix ToastContext test flake (#34045)
* Fix ToastContext test flake * remove import
This commit is contained in:
@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { describe, it, expect, vitest } from "vitest";
|
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 { Toast } from "@vector-im/compound-web";
|
||||||
import React, { type JSX } from "react";
|
import React, { type JSX } from "react";
|
||||||
|
|
||||||
@@ -61,8 +61,6 @@ describe("useToastContext", () => {
|
|||||||
<HappyComponent />
|
<HappyComponent />
|
||||||
</ToastContext>,
|
</ToastContext>,
|
||||||
);
|
);
|
||||||
await waitFor(() => {
|
expect(getByText("Toast!")).toBeVisible();
|
||||||
expect(getByText("Toast!")).toBeInViewport();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user