From fb3ab9e1f1f32bdbd40c8bce56a3818a0c311cfe Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 19 Jan 2016 10:54:12 -0800 Subject: [PATCH] Use const and remove extra returns --- spec/api-desktop-capturer-spec.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/spec/api-desktop-capturer-spec.js b/spec/api-desktop-capturer-spec.js index 3a03366d45..13c6f9e2e5 100644 --- a/spec/api-desktop-capturer-spec.js +++ b/spec/api-desktop-capturer-spec.js @@ -1,17 +1,14 @@ -var assert, desktopCapturer; - -assert = require('assert'); - -desktopCapturer = require('electron').desktopCapturer; +const assert = require('assert'); +const desktopCapturer = require('electron').desktopCapturer; describe('desktopCapturer', function() { - return it('should return a non-empty array of sources', function(done) { - return desktopCapturer.getSources({ + it('should return a non-empty array of sources', function(done) { + desktopCapturer.getSources({ types: ['window', 'screen'] }, function(error, sources) { assert.equal(error, null); assert.notEqual(sources.length, 0); - return done(); + done(); }); }); });