mirror of https://github.com/vector-im/riot-web
Prevent flaky Jest test by pre-loading WASM (#11975)
Fixes https://github.com/vector-im/element-web/issues/26650t3chguy/dedup-icons-17oct
parent
11695d3227
commit
c5377bc228
|
@ -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,
|
||||
|
@ -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 });
|
||||
|
|
Loading…
Reference in New Issue