Update matrix-wysiwyg to consume WASM asset (#28838)

* Update matrix-wysiwyg to consume WASM asset

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update matrix-wysiwyg to consume WASM asset

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2025-01-02 13:08:31 +00:00
committed by GitHub
parent afa7ec695d
commit 4e151f8d03
10 changed files with 36 additions and 97 deletions
@@ -5,7 +5,9 @@ Copyright 2022 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
Please see LICENSE files in the repository root for full details.
*/
import { MsgType } from "matrix-js-sdk/src/matrix";
import { initOnce } from "@vector-im/matrix-wysiwyg";
import { filterConsole, mkEvent } from "../../../../../../test-utils";
import {
@@ -13,6 +15,8 @@ import {
EMOTE_PREFIX,
} from "../../../../../../../src/components/views/rooms/wysiwyg_composer/utils/createMessageContent";
beforeAll(initOnce, 10000);
describe("createMessageContent", () => {
const message = "<em><b>hello</b> world</em>";
@@ -25,13 +29,6 @@ describe("createMessageContent", () => {
"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, {});
}, 10000);
it("Should create html message", async () => {
// When
const content = await createMessageContent(message, true, {});