Include /test in tsc config, fix rest of issues (#8119)

* fix ts issue in PosthogAnalytics test

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

* fix remaining ts issues

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

* tsconfig change

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

* use sdkconfig patch instead of put

Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
Kerry 2022-03-23 11:27:28 +01:00 committed by GitHub
parent 752ad6a9f9
commit a8d65ab5c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 63 additions and 65 deletions

View file

@ -35,10 +35,9 @@ import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
import defaultDispatcher from "../../../../src/dispatcher/dispatcher";
import DocumentOffset from '../../../../src/editor/offset';
import { Layout } from '../../../../src/settings/enums/Layout';
import PlatformPeg from "../../../../src/PlatformPeg";
import { IRoomState } from "../../../../src/components/structures/RoomView";
import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks";
import BasePlatform from "../../../../src/BasePlatform";
import { mockPlatformPeg } from "../../../test-utils/platform";
const WrapWithProviders: React.FC<{
roomContext: IRoomState;
@ -271,8 +270,7 @@ describe('<SendMessageComposer/>', () => {
});
it("persists to session history upon sending", async () => {
jest.spyOn(PlatformPeg, 'get').mockReturnValue(
{ overrideBrowserShortcuts: () => false } as unknown as BasePlatform);
mockPlatformPeg({ overrideBrowserShortcuts: jest.fn().mockReturnValue(false) });
const wrapper = getComponent({ replyToEvent: mockEvent });