mirror of https://github.com/zulip/zulip.git
node tests: Clear message_user_ids.
This defends against future intra-test leaks.
This commit is contained in:
parent
deaffe2f0b
commit
5fe8bbd9da
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue