mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 04:12:02 +00:00
eslint: Enable prefer-arrow-callback.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
960174408f
commit
a79322bc94
@@ -45,7 +45,7 @@ exports.clear_zulip_refs = function () {
|
||||
};
|
||||
|
||||
exports.restore = function () {
|
||||
requires.forEach(function (fn) {
|
||||
requires.forEach((fn) => {
|
||||
delete require.cache[require.resolve(fn)];
|
||||
});
|
||||
Object.assign(global, old_globals);
|
||||
@@ -57,14 +57,12 @@ exports.restore = function () {
|
||||
};
|
||||
|
||||
exports.stub_out_jquery = function () {
|
||||
set_global('$', function () {
|
||||
return {
|
||||
on: function () {},
|
||||
trigger: function () {},
|
||||
hide: function () {},
|
||||
removeClass: function () {},
|
||||
};
|
||||
});
|
||||
set_global('$', () => ({
|
||||
on: function () {},
|
||||
trigger: function () {},
|
||||
hide: function () {},
|
||||
removeClass: function () {},
|
||||
}));
|
||||
$.fn = {};
|
||||
$.now = function () {};
|
||||
};
|
||||
@@ -86,7 +84,7 @@ exports.with_overrides = function (test_function) {
|
||||
|
||||
global[module][func_name] = f;
|
||||
|
||||
clobber_callbacks.push(function () {
|
||||
clobber_callbacks.push(() => {
|
||||
// If you get a failure from this, you probably just
|
||||
// need to have your test do its own overrides and
|
||||
// not cherry-pick off of the prior test's setup.
|
||||
|
||||
Reference in New Issue
Block a user