js: Convert people module to ES6.

This commit is contained in:
Priyank Patel
2020-08-20 19:33:00 +00:00
committed by Anders Kaseorg
parent aca77e9245
commit 551a19c90d
4 changed files with 262 additions and 269 deletions

View File

@@ -104,12 +104,8 @@ run_test("blueslip", () => {
const reply_to = people.pm_reply_to(message);
assert(reply_to.includes("?"));
people.pm_with_user_ids = function () {
return [42];
};
people.get_by_user_id = function () {
return;
};
people.__Rewire__("pm_with_user_ids", () => [42]);
people.__Rewire__("get_by_user_id", () => {});
blueslip.expect("error", "Unknown people in message");
const uri = people.pm_with_url({});
assert.equal(uri.indexOf("unk"), uri.length - 3);