Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

zjsunit: Have run_test pass in override helper.

Steve Howellccfcd2c9aeef
diff --git a/frontend_tests/node_tests/dispatch_subs.js b/frontend_tests/node_tests/dispatch_subs.js
index 2d078b69cbc..90286fa9e06 100644
--- a/frontend_tests/node_tests/dispatch_subs.js
+++ b/frontend_tests/node_tests/dispatch_subs.js
@@ -18,8 +18,8 @@ const dispatch = server_events_dispatch.dispatch_normal_event;
function test(label, f) {
stream_data.clear_subscriptions();
- run_test(label, () => {
- global.with_overrides(f);
+ run_test(label, (override) => {
+ f(override);
});
}
diff --git a/frontend_tests/zjsunit/index.js b/frontend_tests/zjsunit/index.js
index ce579c49c93..c932a165f85 100644
--- a/frontend_tests/zjsunit/index.js
+++ b/frontend_tests/zjsunit/index.js
@@ -106,7 +106,7 @@ global.run_test = (label, f) => {
console.info(" test: " + label);
}
try {
- f();
+ global.with_overrides(f);
} catch (error) {
console.info("-".repeat(50));
console.info(`test failed: ${current_file_name} > ${label}`);