Fix mock client missing user functions (#9887)
This commit is contained in:
parent
880a86c8b1
commit
df03112a3b
1 changed files with 2 additions and 1 deletions
|
@ -30,7 +30,7 @@ import { fireEvent, getByTestId, render, screen, waitFor } from "@testing-librar
|
||||||
import Notifications from "../../../../src/components/views/settings/Notifications";
|
import Notifications from "../../../../src/components/views/settings/Notifications";
|
||||||
import SettingsStore from "../../../../src/settings/SettingsStore";
|
import SettingsStore from "../../../../src/settings/SettingsStore";
|
||||||
import { StandardActions } from "../../../../src/notifications/StandardActions";
|
import { StandardActions } from "../../../../src/notifications/StandardActions";
|
||||||
import { getMockClientWithEventEmitter, mkMessage } from "../../../test-utils";
|
import { getMockClientWithEventEmitter, mkMessage, mockClientMethodsUser } from "../../../test-utils";
|
||||||
|
|
||||||
// don't pollute test output with error logs from mock rejections
|
// don't pollute test output with error logs from mock rejections
|
||||||
jest.mock("matrix-js-sdk/src/logger");
|
jest.mock("matrix-js-sdk/src/logger");
|
||||||
|
@ -205,6 +205,7 @@ describe("<Notifications />", () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const mockClient = getMockClientWithEventEmitter({
|
const mockClient = getMockClientWithEventEmitter({
|
||||||
|
...mockClientMethodsUser(),
|
||||||
getPushRules: jest.fn(),
|
getPushRules: jest.fn(),
|
||||||
getPushers: jest.fn(),
|
getPushers: jest.fn(),
|
||||||
getThreePids: jest.fn(),
|
getThreePids: jest.fn(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue