You've already forked matrix-react-sdk
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:
@ -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);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user