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: Remove with_stub helper.

Abhijeet Prasad Bodasa24d8272e816
diff --git a/frontend_tests/zjsunit/stub.js b/frontend_tests/zjsunit/stub.js
index dc73b015a8b..37591259097 100644
--- a/frontend_tests/zjsunit/stub.js
+++ b/frontend_tests/zjsunit/stub.js
@@ -30,17 +30,11 @@ exports.make_stub = function () {
return self;
};
-exports.with_stub = function (f) {
+(function test_ourselves() {
const stub = exports.make_stub();
- f(stub);
+ stub.f("blue", 42);
assert.equal(stub.num_calls, 1);
-};
-
-(function test_ourselves() {
- exports.with_stub((stub) => {
- stub.f("blue", 42);
- const args = stub.get_args("color", "n");
- assert.equal(args.color, "blue");
- assert.equal(args.n, 42);
- });
+ const args = stub.get_args("color", "n");
+ assert.equal(args.color, "blue");
+ assert.equal(args.n, 42);
})();