Skip to content

Commit

Permalink
test: fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Jan 23, 2023
1 parent 459bc52 commit f295174
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/categories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
1 change: 0 additions & 1 deletion src/categories/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
4 changes: 2 additions & 2 deletions test/categories.js
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ describe('Categories', () => {
});
});

describe.only('Categories.getModeratorUids', () => {
describe('Categories.getModeratorUids', () => {
let cid;

before(async () => {
Expand Down Expand Up @@ -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'));
});

Expand Down

0 comments on commit f295174

Please sign in to comment.