the-draupnir-project / Draupnir

A Matrix moderation bot
https://the-draupnir-project.github.io/draupnir-documentation/
Academic Free License v3.0
68 stars 13 forks source link

Allow Draupnir to be setup and configured by individual integration tests rather than share the same config for all of them. #433

Open Gnuxie opened 1 month ago

Gnuxie commented 1 month ago

Currently we use test/integration/fixtures.ts to setup Draupnir for each integration test, and the tests themselves have no way to change the config, because by the time they get control, a Draupnir has already been created for them. This is complicated in part by Mocha.

As of writing there is only one test that does this which is the acceptInvitesFromSpace test. Which we are now going to need to remove, since we have moved the "joinOnInvite" logic to a protection here. It sucks quite a lot that we have to remove this.