Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Prevent flaky Jest test by pre-loading WASM #11975

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/
import { MsgType } from "matrix-js-sdk/src/matrix";

import { mkEvent } from "../../../../../test-utils";
import { filterConsole, mkEvent } from "../../../../../test-utils";
import { RoomPermalinkCreator } from "../../../../../../src/utils/permalinks/Permalinks";
import {
createMessageContent,
Expand All @@ -42,6 +42,17 @@ describe("createMessageContent", () => {
});

describe("Richtext composer input", () => {
filterConsole(
"WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm`",
);

beforeAll(async () => {
// Warm up by creating the component once, with a long timeout.
// This prevents tests timing out because of the time spent loading
// the WASM component.
await createMessageContent(message, true, { permalinkCreator });
}, 10000);

it("Should create html message", async () => {
// When
const content = await createMessageContent(message, true, { permalinkCreator });
Expand Down
Loading