update location event types (#8022)

* update types

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix tests

Signed-off-by: Kerry Archibald <kerrya@element.io>

* lint

Signed-off-by: Kerry Archibald <kerrya@element.io>

* trigger

Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
Kerry 2022-03-10 19:03:31 +01:00 committed by GitHub
parent a4b2e0c0d8
commit e96d9157a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 39 additions and 35 deletions

View file

@ -20,7 +20,7 @@ import { RoomMember } from 'matrix-js-sdk/src/models/room-member';
import { MatrixClient } from 'matrix-js-sdk/src/client';
import { mocked } from 'jest-mock';
import { act } from 'react-dom/test-utils';
import { ASSET_NODE_TYPE, LocationAssetType } from 'matrix-js-sdk/src/@types/location';
import { M_ASSET, LocationAssetType } from 'matrix-js-sdk/src/@types/location';
import '../../../skinned-sdk';
import LocationShareMenu from '../../../../src/components/views/location/LocationShareMenu';
@ -162,7 +162,7 @@ describe('<LocationShareMenu />', () => {
expect(messageRoomId).toEqual(defaultProps.roomId);
expect(relation).toEqual(null);
expect(messageBody).toEqual(expect.objectContaining({
[ASSET_NODE_TYPE.name]: {
[M_ASSET.name]: {
type: LocationAssetType.Self,
},
}));
@ -243,7 +243,7 @@ describe('<LocationShareMenu />', () => {
expect(messageRoomId).toEqual(defaultProps.roomId);
expect(relation).toEqual(null);
expect(messageBody).toEqual(expect.objectContaining({
[ASSET_NODE_TYPE.name]: {
[M_ASSET.name]: {
type: LocationAssetType.Pin,
},
}));