EditWysiwygComposer-test: wait for the wasm to load in beforeAll (#11904)

pull/28217/head
Richard van der Hoff 2023-11-19 21:15:23 +00:00 committed by GitHub
parent 6b73700b05
commit 29ed91749e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 4 deletions

View File

@ -54,10 +54,16 @@ describe("EditWysiwygComposer", () => {
);
};
beforeAll(() => {
// Load the dynamic import
customRender(false).unmount();
});
beforeAll(
async () => {
// Load the dynamic import
const component = customRender(false);
await component.findByRole("textbox");
component.unmount();
},
// it can take a while to load the wasm
20000,
);
it("Should not render the component when not ready", async () => {
// When