node tests: Clear message_user_ids.

This defends against future intra-test leaks.
This commit is contained in:
Steve Howell 2021-04-03 16:23:49 +00:00 committed by Steve Howell
parent deaffe2f0b
commit 5fe8bbd9da
2 changed files with 5 additions and 0 deletions

View File

@ -90,6 +90,7 @@ function convert_recipients(people) {
function test(label, f) {
run_test(label, (override) => {
message_store.clear_for_testing();
message_user_ids.clear_for_testing();
f(override);
});
}

View File

@ -13,6 +13,10 @@
*/
const user_set = new Set();
export function clear_for_testing() {
user_set.clear();
}
export function user_ids() {
return Array.from(user_set);
}