diff --git a/spec/api-debugger-spec.js b/spec/api-debugger-spec.js index fdad013b8cfb..634d965a85fe 100644 --- a/spec/api-debugger-spec.js +++ b/spec/api-debugger-spec.js @@ -80,24 +80,28 @@ describe('debugger module', function () { try { w.webContents.debugger.attach() } catch (err) { - done('unexpected error : ' + err) + return done('unexpected error : ' + err) } + /* eslint-disable */ + // standard expects callback errors to be handled, + // but for some reason this err is not actually null.. var callback = function (err, res) { assert(!res.wasThrown) assert.equal(res.result.value, 6) w.webContents.debugger.detach() done() } + /* eslint-enable */ const params = { - 'expression': '4+2', + 'expression': '4+2' } w.webContents.debugger.sendCommand('Runtime.evaluate', params, callback) }) it('fires message event', function (done) { - var url = process.platform != 'win32' ? - 'file://' + path.join(fixtures, 'pages', 'a.html') : - 'file:///' + path.join(fixtures, 'pages', 'a.html').replace(/\\/g, '/') + var url = process.platform !== 'win32' + ? 'file://' + path.join(fixtures, 'pages', 'a.html') + : 'file:///' + path.join(fixtures, 'pages', 'a.html').replace(/\\/g, '/') w.webContents.loadURL(url) try { w.webContents.debugger.attach() @@ -105,7 +109,7 @@ describe('debugger module', function () { done('unexpected error : ' + err) } w.webContents.debugger.on('message', function (e, method, params) { - if (method == 'Console.messageAdded') { + if (method === 'Console.messageAdded') { assert.equal(params.message.type, 'log') assert.equal(params.message.url, url) assert.equal(params.message.text, 'a') diff --git a/spec/api-ipc-spec.js b/spec/api-ipc-spec.js index 862a6c99c176..0b279ef7266e 100644 --- a/spec/api-ipc-spec.js +++ b/spec/api-ipc-spec.js @@ -60,7 +60,7 @@ describe('ipc module', function () { it('can construct an object from its member', function () { var call = remote.require(path.join(fixtures, 'module', 'call.js')) - var obj = new call.constructor + var obj = new call.constructor // eslint-disable-line assert.equal(obj.test, 'test') }) @@ -68,7 +68,7 @@ describe('ipc module', function () { var remoteFunctions = remote.require(path.join(fixtures, 'module', 'function.js')) assert.equal(remoteFunctions.aFunction(), 1127) - remoteFunctions.aFunction = function () { return 1234; } + remoteFunctions.aFunction = function () { return 1234 } assert.equal(remoteFunctions.aFunction(), 1234) assert.equal(delete remoteFunctions.aFunction, true) @@ -106,7 +106,7 @@ describe('ipc module', function () { it('can return same object with different getters', function () { var contents1 = remote.getCurrentWindow().webContents var contents2 = remote.getCurrentWebContents() - assert(contents1 == contents2) + assert(contents1 === contents2) }) }) diff --git a/spec/chromium-spec.js b/spec/chromium-spec.js index a27d630b04ce..87140be7c805 100644 --- a/spec/chromium-spec.js +++ b/spec/chromium-spec.js @@ -391,7 +391,7 @@ describe('chromium feature', function () { done('user agent is empty') } }) - var socket = new WebSocket(`ws://127.0.0.1: ${port}`) + var socket = new WebSocket(`ws://127.0.0.1:${port}`) assert(socket) }) })