mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
Extend default timeout in mocha
This commit is contained in:
parent
cc9f393ed7
commit
7d404ede06
@ -13,7 +13,7 @@
|
||||
"lint": "tslint --project ./tsconfig.json -t stylish",
|
||||
"start:dev": "yarn build && node --async-stack-traces lib/index.js",
|
||||
"test": "ts-mocha --project ./tsconfig.json test/commands/**/*.ts",
|
||||
"test:integration": "NODE_ENV=harness ts-mocha --async-stack-traces --require test/integration/fixtures.ts --project ./tsconfig.json \"test/integration/**/*Test.ts\"",
|
||||
"test:integration": "NODE_ENV=harness ts-mocha --async-stack-traces --require test/integration/fixtures.ts --project ./tsconfig.json \"test/integration/**/*Test.ts\" --timeout 120000",
|
||||
"test:manual": "NODE_ENV=harness ts-node test/integration/manualLaunchScript.ts",
|
||||
"version": "sed -i '/# version automated/s/[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*/'$npm_package_version'/' synapse_antispam/setup.py && git add synapse_antispam/setup.py && cat synapse_antispam/setup.py"
|
||||
},
|
||||
|
@ -28,7 +28,6 @@ async function createPolicyRule(client: MatrixClient, policyRoomId: string, poli
|
||||
|
||||
describe("Test: Updating the BanList", function () {
|
||||
it("Calculates what has changed correctly.", async function () {
|
||||
this.timeout(10000);
|
||||
const mjolnir = config.RUNTIME.client!
|
||||
const moderator = await newTestUser({ name: { contains: "moderator" }});
|
||||
const banListId = await mjolnir.createRoom({ invite: [await moderator.getUserId()]});
|
||||
@ -119,7 +118,6 @@ describe("Test: Updating the BanList", function () {
|
||||
assert.equal(banList.userRules.filter(r => r.entity === '@old:localhost:9999').length, 1);
|
||||
})
|
||||
it("Will remove rules with old types when they are 'soft redacted' with a different but more recent event type.", async function () {
|
||||
this.timeout(3000);
|
||||
const mjolnir = config.RUNTIME.client!
|
||||
const moderator = await newTestUser({ name: { contains: "moderator" }});
|
||||
const banListId = await mjolnir.createRoom({ invite: [await moderator.getUserId()]});
|
||||
@ -141,7 +139,6 @@ describe("Test: Updating the BanList", function () {
|
||||
assert.equal(banList.userRules.filter(rule => rule.entity === entity).length, 0, 'The rule should no longer be stored.');
|
||||
})
|
||||
it("A rule of the most recent type won't be deleted when an old rule is deleted for the same entity.", async function () {
|
||||
this.timeout(3000);
|
||||
const mjolnir = config.RUNTIME.client!
|
||||
const moderator = await newTestUser({ name: { contains: "moderator" }});
|
||||
const banListId = await mjolnir.createRoom({ invite: [await moderator.getUserId()]});
|
||||
@ -295,7 +292,6 @@ describe('Test: ACL updates will batch when rules are added in succession.', fun
|
||||
describe('Test: unbaning entities via the BanList.', function () {
|
||||
afterEach(function() { this.moderator?.stop(); });
|
||||
it('Will remove rules that have legacy types', async function () {
|
||||
this.timeout(20000)
|
||||
const mjolnir = config.RUNTIME.client!
|
||||
const serverName: string = new UserID(await mjolnir.getUserId()).domain
|
||||
const moderator = await newTestUser({ name: { contains: "moderator" }});
|
||||
|
Loading…
Reference in New Issue
Block a user