test: fix broken test

isekai-main
Julian Lam 2 years ago
parent 459bc52338
commit f295174e07

@ -131,7 +131,6 @@ Categories.getModeratorUids = async function (cids) {
return _.uniq(sets.uids[index].concat(_.flatten(sets.groupNames[index].map(g => map[g]))));
});
console.log('what', moderatorUids);
return moderatorUids;
};

@ -11,7 +11,6 @@ const cache = require('../cache');
module.exports = function (Categories) {
Categories.update = async function (modified) {
const cids = Object.keys(modified);
console.log('updating', cids);
await Promise.all(cids.map(cid => updateCategory(cid, modified[cid])));
return cids;
};

@ -826,7 +826,7 @@ describe('Categories', () => {
});
});
describe.only('Categories.getModeratorUids', () => {
describe('Categories.getModeratorUids', () => {
let cid;
before(async () => {
@ -865,7 +865,7 @@ describe('Categories', () => {
const payload = {};
payload[cid] = { disabled: 1 };
await Categories.update(payload);
const uids = await Categories.getModeratorUids([1, 2]);
const uids = await Categories.getModeratorUids([cid, 2]);
assert(!uids[0].includes('1'));
});

Loading…
Cancel
Save