Reuse PushProcessor from MatrixClient (#29561)
* Reuse PushProcessor from MatrixClient Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Reuse PushProcessor getPushRuleGlobRegex Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * delint Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update regex handling Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
3a39486468
commit
0d28df0f67
@@ -19,6 +19,7 @@ import {
|
||||
import { MediaHandler } from "matrix-js-sdk/src/webrtc/mediaHandler";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { PushProcessor } from "matrix-js-sdk/src/pushprocessor";
|
||||
|
||||
import LoggedInView from "../../../../src/components/structures/LoggedInView";
|
||||
import { SDKContext } from "../../../../src/contexts/SDKContext";
|
||||
@@ -75,6 +76,8 @@ describe("<LoggedInView />", () => {
|
||||
jest.clearAllMocks();
|
||||
mockClient.getMediaHandler.mockReturnValue(mediaHandler);
|
||||
mockClient.setPushRuleActions.mockReset().mockResolvedValue({});
|
||||
// @ts-expect-error
|
||||
mockClient.pushProcessor = new PushProcessor(mockClient);
|
||||
});
|
||||
|
||||
describe("synced push rules", () => {
|
||||
|
||||
Reference in New Issue
Block a user