-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unbitrotting ruleserver tests #418
Conversation
let config = configRead(); | ||
if (!config?.web?.ruleServer?.enabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that this.mjolnir
will exist in the beforeAll hook, but this works too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my experience, it didn't seem to exist.
await badUser.sendMessage(unprotectedRoom, {msgtype: 'm.text', body: 'Something bad and mean'}); | ||
|
||
await waitForRuleChange(this.config.web.address, this.mjolnir.config.web.port, async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you have forgot to add the change to waitForRuleChange
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out that waitForRuleChange
had already been refactored, just not its call sites.
import config from "../../src/config"; | ||
import { read as configRead } from "../../src/config"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to prevent this from happening again, the test should be added to the end of tsconfig.json
.
6ee94d2
to
a7e1065
Compare
a7e1065
to
96066ac
Compare
No description provided.