diff --git a/frontend_tests/zjsunit/zjquery.js b/frontend_tests/zjsunit/zjquery.js index 7878ba34c8..ae0b52de60 100644 --- a/frontend_tests/zjsunit/zjquery.js +++ b/frontend_tests/zjsunit/zjquery.js @@ -329,9 +329,11 @@ exports.make_new_elem = function (selector, opts) { stop: function () { return self; }, - text: function (arg) { - if (arg !== undefined) { - text = arg; + text: function (...args) { + if (args.length !== 0) { + if (args[0] !== undefined) { + text = args[0].toString(); + } return self; } return text;