You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-07 21:23:00 +03:00
Switch to importing most things from the main matrix-js-sdk export (#11406)
* Switch to importing most things from the main matrix-js-sdk export * fix imports * Iterate * Fix tests
This commit is contained in:
committed by
GitHub
parent
0842559fb2
commit
ad73b0c16e
@@ -16,8 +16,7 @@ limitations under the License.
|
||||
|
||||
import React from "react";
|
||||
import { render, RenderResult } from "@testing-library/react";
|
||||
import { RoomMember } from "matrix-js-sdk/src/matrix";
|
||||
import { LocationAssetType } from "matrix-js-sdk/src/@types/location";
|
||||
import { RoomMember, LocationAssetType } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import LocationViewDialog from "../../../../src/components/views/location/LocationViewDialog";
|
||||
import { TILE_SERVER_WK_KEY } from "../../../../src/utils/WellKnownUtils";
|
||||
|
@@ -15,8 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
import { mocked } from "jest-mock";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { makeLocationContent } from "matrix-js-sdk/src/content-helpers";
|
||||
import { ContentHelpers, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { LegacyLocationEventContent, MLocationEventContent } from "matrix-js-sdk/src/@types/location";
|
||||
|
||||
import { doMaybeLocalRoomAction } from "../../../../src/utils/local-room";
|
||||
@@ -30,10 +29,6 @@ jest.mock("../../../../src/utils/local-room", () => ({
|
||||
doMaybeLocalRoomAction: jest.fn(),
|
||||
}));
|
||||
|
||||
jest.mock("matrix-js-sdk/src/content-helpers", () => ({
|
||||
makeLocationContent: jest.fn(),
|
||||
}));
|
||||
|
||||
describe("shareLocation", () => {
|
||||
const roomId = "!room:example.com";
|
||||
const shareType = LocationShareType.Pin;
|
||||
@@ -42,6 +37,7 @@ describe("shareLocation", () => {
|
||||
let shareLocationFn: ShareLocationFn;
|
||||
|
||||
beforeEach(() => {
|
||||
const makeLocationContent = jest.spyOn(ContentHelpers, "makeLocationContent");
|
||||
client = {
|
||||
sendMessage: jest.fn(),
|
||||
} as unknown as MatrixClient;
|
||||
|
Reference in New Issue
Block a user