[eslint] fix no-unused-vars violations

This commit is contained in:
spalger
2018-05-14 12:16:03 -07:00
parent 898913545a
commit f493527dc4
22 changed files with 93 additions and 117 deletions

View File

@ -134,7 +134,7 @@ describe('Log class', function () {
log = new Log({
log: [
{
type: function (log, config) {
type: function (log) {
log.on('error', _.noop);
log.on('warning', _.noop);
log.on('info', _.noop);
@ -237,22 +237,28 @@ describe('Log class', function () {
it('rejects numbers and other truthy data-types', function () {
expect(function () {
var log = new Log({ log: 1515 });
// eslint-disable-next-line no-new
new Log({ log: 1515 });
}).to.throwError(/invalid logging output config/i);
expect(function () {
var log = new Log({ log: /regexp/ });
// eslint-disable-next-line no-new
new Log({ log: /regexp/ });
}).to.throwError(/invalid logging output config/i);
expect(function () {
var log = new Log({ log: new Date() });
// eslint-disable-next-line no-new
new Log({ log: new Date() });
}).to.throwError(/invalid logging output config/i);
expect(function () {
var log = new Log({ log: [1515] });
// eslint-disable-next-line no-new
new Log({ log: [1515] });
}).to.throwError(/invalid logging output config/i);
expect(function () {
var log = new Log({ log: [/regexp/] });
// eslint-disable-next-line no-new
new Log({ log: [/regexp/] });
}).to.throwError(/invalid logging output config/i);
expect(function () {
var log = new Log({ log: [new Date()] });
// eslint-disable-next-line no-new
new Log({ log: [new Date()] });
}).to.throwError(/invalid logging output config/i);
});
});