1
0
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:
Michael Telatynski
2023-08-15 16:00:17 +01:00
committed by GitHub
parent 0842559fb2
commit ad73b0c16e
52 changed files with 262 additions and 277 deletions

View File

@@ -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;