mirror of
https://github.com/zulip/zulip.git
synced 2025-10-27 01:53:59 +00:00
minor: Suggest with_field instead of override for non-functions.
This commit is contained in:
committed by
Steve Howell
parent
a24d8272e8
commit
c183076a91
@@ -106,7 +106,9 @@ exports.with_overrides = function (test_function) {
|
||||
// step. Generally our code calls `run_test`, which wraps
|
||||
// `with_overrides`.
|
||||
if (typeof f !== "function") {
|
||||
throw new TypeError("You can only override with a function.");
|
||||
throw new TypeError(
|
||||
"You can only override with a function. Use with_field for non-functions.",
|
||||
);
|
||||
}
|
||||
|
||||
if (!funcs.has(obj)) {
|
||||
|
||||
Reference in New Issue
Block a user