1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-30 02:21:17 +03:00

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
8 changed files with 63 additions and 65 deletions

View File

@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { mocked } from 'jest-mock';
import { ConditionKind, PushRuleActionName, TweakName } from "matrix-js-sdk/src/@types/PushRules";
import { stubClient } from "./test-utils";
@ -26,7 +27,7 @@ describe("RoomNotifs test", () => {
});
it("getRoomNotifsState handles rules with no conditions", () => {
MatrixClientPeg.get().pushRules = {
mocked(MatrixClientPeg.get()).pushRules = {
global: {
override: [{
rule_id: "!roomId:server",
@ -40,7 +41,7 @@ describe("RoomNotifs test", () => {
});
it("getRoomNotifsState handles guest users", () => {
MatrixClientPeg.get().isGuest.mockReturnValue(true);
mocked(MatrixClientPeg.get()).isGuest.mockReturnValue(true);
expect(getRoomNotifsState("!roomId:server")).toBe(RoomNotifState.AllMessages);
});