lint: Fix more ESLint errors

This commit is contained in:
Richard Hansen 2021-01-31 15:23:44 -05:00 committed by John McLear
parent 1bc52f4913
commit 47f0a7dacf
3 changed files with 30 additions and 35 deletions

View file

@ -1,14 +1,9 @@
/* global __dirname, __filename, afterEach, beforeEach, describe, it, process, require */
function m(mod) { return `${__dirname}/../../../src/${mod}`; }
'use strict';
const assert = require('assert').strict;
const common = require('../common');
const hooks = require(m('static/js/pluginfw/hooks'));
const plugins = require(m('static/js/pluginfw/plugin_defs'));
const sinon = require(m('node_modules/sinon'));
const logger = common.logger;
const hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
const plugins = require('ep_etherpad-lite/static/js/pluginfw/plugin_defs');
const sinon = require('ep_etherpad-lite/node_modules/sinon');
describe(__filename, function () {
const hookName = 'testHook';
@ -203,7 +198,7 @@ describe(__filename, function () {
// Test various ways a hook might attempt to settle twice. (Examples: call the callback a second
// time, or call the callback and then return a value.)
describe('bad hook function behavior (double settle)', function () {
beforeEach(function () {
beforeEach(async function () {
sinon.stub(console, 'error');
});
@ -558,7 +553,7 @@ describe(__filename, function () {
// Test various ways a hook might attempt to settle twice. (Examples: call the callback a second
// time, or call the callback and then return a value.)
describe('bad hook function behavior (double settle)', function () {
beforeEach(function () {
beforeEach(async function () {
sinon.stub(console, 'error');
});

View file

@ -1,11 +1,9 @@
/* global __dirname, __filename, Buffer, afterEach, before, beforeEach, describe, it, require */
function m(mod) { return `${__dirname}/../../../src/${mod}`; }
'use strict';
const assert = require('assert').strict;
const common = require('../common');
const plugins = require(m('static/js/pluginfw/plugin_defs'));
const settings = require(m('node/utils/Settings'));
const plugins = require('ep_etherpad-lite/static/js/pluginfw/plugin_defs');
const settings = require('ep_etherpad-lite/node/utils/Settings');
describe(__filename, function () {
let agent;
@ -402,7 +400,7 @@ describe(__filename, function () {
};
const handlers = {};
beforeEach(function () {
beforeEach(async function () {
failHookNames.forEach((hookName) => {
const handler = new Handler(hookName);
handlers[hookName] = handler;