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

Apply prettier formatting

This commit is contained in:
Michael Weimann
2022-12-12 12:24:14 +01:00
parent 1cac306093
commit 526645c791
1576 changed files with 65385 additions and 62478 deletions

View File

@ -14,17 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { mocked } from 'jest-mock';
import { mocked } from "jest-mock";
import { ConditionKind, PushRuleActionName, TweakName } from "matrix-js-sdk/src/@types/PushRules";
import { NotificationCountType, Room } from 'matrix-js-sdk/src/models/room';
import { NotificationCountType, Room } from "matrix-js-sdk/src/models/room";
import { mkEvent, stubClient } from "./test-utils";
import { MatrixClientPeg } from "../src/MatrixClientPeg";
import {
getRoomNotifsState,
RoomNotifState,
getUnreadNotificationCount,
} from "../src/RoomNotifs";
import { getRoomNotifsState, RoomNotifState, getUnreadNotificationCount } from "../src/RoomNotifs";
describe("RoomNotifs test", () => {
beforeEach(() => {
@ -35,12 +31,14 @@ describe("RoomNotifs test", () => {
const cli = MatrixClientPeg.get();
mocked(cli).pushRules = {
global: {
override: [{
rule_id: "!roomId:server",
enabled: true,
default: false,
actions: [],
}],
override: [
{
rule_id: "!roomId:server",
enabled: true,
default: false,
actions: [],
},
],
},
};
expect(getRoomNotifsState(cli, "!roomId:server")).toBe(null);
@ -56,17 +54,21 @@ describe("RoomNotifs test", () => {
const cli = MatrixClientPeg.get();
cli.pushRules = {
global: {
override: [{
rule_id: "!roomId:server",
enabled: true,
default: false,
conditions: [{
kind: ConditionKind.EventMatch,
key: "room_id",
pattern: "!roomId:server",
}],
actions: [PushRuleActionName.DontNotify],
}],
override: [
{
rule_id: "!roomId:server",
enabled: true,
default: false,
conditions: [
{
kind: ConditionKind.EventMatch,
key: "room_id",
pattern: "!roomId:server",
},
],
actions: [PushRuleActionName.DontNotify],
},
],
},
};
expect(getRoomNotifsState(cli, "!roomId:server")).toBe(RoomNotifState.Mute);