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.

namespace: Tighten override_rewire old_value check.

Anders Kaseorg64c973d8ec03
diff --git a/web/tests/lib/namespace.js b/web/tests/lib/namespace.js
index 82bd634728b..3c78a596ca9 100644
--- a/web/tests/lib/namespace.js
+++ b/web/tests/lib/namespace.js
@@ -393,7 +393,7 @@ exports.with_overrides = function (test_function) {
if (typeof value === "function") {
assert.ok(
- obj[prop] === undefined || typeof obj[prop] === "function",
+ typeof old_value === "function",
`
You are overriding a non-function with a function.
This is almost certainly an error.