mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
fix CI (#282)
ts-mocha has also been updated to make running locally possible (else it gives a confusing error that tsconfig.json is not "json" or the likes)
This commit is contained in:
parent
3d10f998b7
commit
cc9f393ed7
@ -30,7 +30,7 @@
|
|||||||
"eslint": "^7.32",
|
"eslint": "^7.32",
|
||||||
"expect": "^27.0.6",
|
"expect": "^27.0.6",
|
||||||
"mocha": "^9.0.1",
|
"mocha": "^9.0.1",
|
||||||
"ts-mocha": "^8.0.0",
|
"ts-mocha": "^9.0.2",
|
||||||
"tslint": "^6.1.3",
|
"tslint": "^6.1.3",
|
||||||
"typescript": "^4.3.5",
|
"typescript": "^4.3.5",
|
||||||
"typescript-formatter": "^7.2"
|
"typescript-formatter": "^7.2"
|
||||||
|
@ -30,7 +30,7 @@ describe("Test: The make admin command", function () {
|
|||||||
|
|
||||||
await moderator.joinRoom(config.managementRoom);
|
await moderator.joinRoom(config.managementRoom);
|
||||||
LogService.debug("makeadminTest", `Joining managementRoom: ${config.managementRoom}`);
|
LogService.debug("makeadminTest", `Joining managementRoom: ${config.managementRoom}`);
|
||||||
let targetRoom = await moderator.createRoom({ invite: [mjolnirUserId] });
|
let targetRoom = await moderator.createRoom({ invite: [mjolnirUserId], preset: "public_chat" });
|
||||||
LogService.debug("makeadminTest", `moderator creating targetRoom: ${targetRoom}; and inviting ${mjolnirUserId}`);
|
LogService.debug("makeadminTest", `moderator creating targetRoom: ${targetRoom}; and inviting ${mjolnirUserId}`);
|
||||||
await moderator.sendMessage(this.mjolnir.managementRoomId, { msgtype: 'm.text.', body: `!mjolnir rooms add ${targetRoom}` });
|
await moderator.sendMessage(this.mjolnir.managementRoomId, { msgtype: 'm.text.', body: `!mjolnir rooms add ${targetRoom}` });
|
||||||
LogService.debug("makeadminTest", `Adding targetRoom: ${targetRoom}`);
|
LogService.debug("makeadminTest", `Adding targetRoom: ${targetRoom}`);
|
||||||
|
@ -258,6 +258,7 @@ describe("Test: Testing RoomMemberManager", function() {
|
|||||||
|
|
||||||
// Setup a moderator.
|
// Setup a moderator.
|
||||||
this.moderator = await newTestUser({ name: { contains: "moderator" } });
|
this.moderator = await newTestUser({ name: { contains: "moderator" } });
|
||||||
|
await this.mjolnir.client.inviteUser(await this.moderator.getUserId(), this.mjolnir.managementRoomId)
|
||||||
await this.moderator.joinRoom(this.mjolnir.managementRoomId);
|
await this.moderator.joinRoom(this.mjolnir.managementRoomId);
|
||||||
|
|
||||||
// Create a few users and two rooms.
|
// Create a few users and two rooms.
|
||||||
@ -272,9 +273,11 @@ describe("Test: Testing RoomMemberManager", function() {
|
|||||||
}
|
}
|
||||||
const roomId1 = await this.moderator.createRoom({
|
const roomId1 = await this.moderator.createRoom({
|
||||||
invite: userIds,
|
invite: userIds,
|
||||||
|
preset: "public_chat",
|
||||||
});
|
});
|
||||||
const roomId2 = await this.moderator.createRoom({
|
const roomId2 = await this.moderator.createRoom({
|
||||||
invite: userIds,
|
invite: userIds,
|
||||||
|
preset: "public_chat",
|
||||||
});
|
});
|
||||||
const roomIds = [roomId1, roomId2];
|
const roomIds = [roomId1, roomId2];
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ describe("Test: standard consequences", function() {
|
|||||||
it("Mjolnir doesn't ban a good user", async function() {
|
it("Mjolnir doesn't ban a good user", async function() {
|
||||||
this.timeout(20000);
|
this.timeout(20000);
|
||||||
|
|
||||||
let protectedRoomId = await this.mjolnir.client.createRoom({ invite: [await goodUser.getUserId()] });
|
let protectedRoomId = await this.mjolnir.client.createRoom({ invite: [await goodUser.getUserId(), await badUser.getUserId()] });
|
||||||
await badUser.joinRoom(protectedRoomId);
|
await badUser.joinRoom(protectedRoomId);
|
||||||
await goodUser.joinRoom(protectedRoomId);
|
await goodUser.joinRoom(protectedRoomId);
|
||||||
await this.mjolnir.addProtectedRoom(protectedRoomId);
|
await this.mjolnir.addProtectedRoom(protectedRoomId);
|
||||||
|
@ -2757,10 +2757,10 @@ tr46@^2.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
punycode "^2.1.1"
|
punycode "^2.1.1"
|
||||||
|
|
||||||
ts-mocha@^8.0.0:
|
ts-mocha@^9.0.2:
|
||||||
version "8.0.0"
|
version "9.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/ts-mocha/-/ts-mocha-8.0.0.tgz#962d0fa12eeb6468aa1a6b594bb3bbc818da3ef0"
|
resolved "https://registry.yarnpkg.com/ts-mocha/-/ts-mocha-9.0.2.tgz#c1ef0248874d04a0f26dd9bd8d88e617a8d82ab1"
|
||||||
integrity sha512-Kou1yxTlubLnD5C3unlCVO7nh0HERTezjoVhVw/M5S1SqoUec0WgllQvPk3vzPMc6by8m6xD1uR1yRf8lnVUbA==
|
integrity sha512-WyQjvnzwrrubl0JT7EC1yWmNpcsU3fOuBFfdps30zbmFBgKniSaSOyZMZx+Wq7kytUs5CY+pEbSYEbGfIKnXTw==
|
||||||
dependencies:
|
dependencies:
|
||||||
ts-node "7.0.1"
|
ts-node "7.0.1"
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
|
Loading…
Reference in New Issue
Block a user