Work around flaky test
This commit is contained in:
parent
5985c8d280
commit
c686100008
|
@ -362,7 +362,6 @@ describe('KickbanModule', () => {
|
|||
);
|
||||
});
|
||||
|
||||
// TODO: for whatever reason, this test is flaky
|
||||
it('inserts a valid IPv6 ban', done => {
|
||||
const longIP = require('../../lib/utilities').expandIPv6('::abcd');
|
||||
|
||||
|
|
|
@ -404,7 +404,12 @@ KickBanModule.prototype.banAll = async function banAll(
|
|||
);
|
||||
|
||||
if (!await dbIsNameBanned(chan.name, name)) {
|
||||
promises.push(this.banName(actor, name, reason));
|
||||
promises.push(this.banName(actor, name, reason).catch(error => {
|
||||
// TODO: banning should be made idempotent, not throw an error
|
||||
if (!/already banned/.test(error.message)) {
|
||||
throw error;
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
await Promise.all(promises);
|
||||
|
|
Loading…
Reference in a new issue