mirror of
https://github.com/zulip/zulip.git
synced 2025-10-29 02:53:52 +00:00
node tests: Clear message_user_ids.
This defends against future intra-test leaks.
This commit is contained in:
committed by
Steve Howell
parent
deaffe2f0b
commit
5fe8bbd9da
@@ -90,6 +90,7 @@ function convert_recipients(people) {
|
|||||||
function test(label, f) {
|
function test(label, f) {
|
||||||
run_test(label, (override) => {
|
run_test(label, (override) => {
|
||||||
message_store.clear_for_testing();
|
message_store.clear_for_testing();
|
||||||
|
message_user_ids.clear_for_testing();
|
||||||
f(override);
|
f(override);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,10 @@
|
|||||||
*/
|
*/
|
||||||
const user_set = new Set();
|
const user_set = new Set();
|
||||||
|
|
||||||
|
export function clear_for_testing() {
|
||||||
|
user_set.clear();
|
||||||
|
}
|
||||||
|
|
||||||
export function user_ids() {
|
export function user_ids() {
|
||||||
return Array.from(user_set);
|
return Array.from(user_set);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user