You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-11-29 21:23:11 +03:00
Optimise Jest run in CI (#9542)
This commit is contained in:
committed by
GitHub
parent
28ecdc0cb4
commit
04bc8fb71c
@@ -63,9 +63,9 @@ describe("ContentMessages", () => {
|
||||
describe("sendStickerContentToRoom", () => {
|
||||
beforeEach(() => {
|
||||
mocked(client.sendStickerMessage).mockReturnValue(prom);
|
||||
mocked(doMaybeLocalRoomAction).mockImplementation((
|
||||
mocked(doMaybeLocalRoomAction).mockImplementation(<T>(
|
||||
roomId: string,
|
||||
fn: (actualRoomId: string) => Promise<ISendEventResponse>,
|
||||
fn: (actualRoomId: string) => Promise<T>,
|
||||
client?: MatrixClient,
|
||||
) => {
|
||||
return fn(roomId);
|
||||
@@ -100,9 +100,9 @@ describe("ContentMessages", () => {
|
||||
Object.defineProperty(global.Image.prototype, 'width', {
|
||||
get() { return 800; },
|
||||
});
|
||||
mocked(doMaybeLocalRoomAction).mockImplementation((
|
||||
mocked(doMaybeLocalRoomAction).mockImplementation(<T>(
|
||||
roomId: string,
|
||||
fn: (actualRoomId: string) => Promise<ISendEventResponse>,
|
||||
fn: (actualRoomId: string) => Promise<T>,
|
||||
) => fn(roomId));
|
||||
mocked(BlurhashEncoder.instance.getBlurhash).mockResolvedValue(undefined);
|
||||
});
|
||||
@@ -196,9 +196,9 @@ describe("ContentMessages", () => {
|
||||
const roomId = "!roomId:server";
|
||||
|
||||
beforeEach(() => {
|
||||
mocked(doMaybeLocalRoomAction).mockImplementation((
|
||||
mocked(doMaybeLocalRoomAction).mockImplementation(<T>(
|
||||
roomId: string,
|
||||
fn: (actualRoomId: string) => Promise<ISendEventResponse>,
|
||||
fn: (actualRoomId: string) => Promise<T>,
|
||||
) => fn(roomId));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user