From ce0165367cb92206fcfb224ebce6848b4c642a43 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 9 Aug 2016 15:31:24 -0700 Subject: [PATCH] Add spec for invalid capture options --- spec/api-desktop-capturer-spec.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/api-desktop-capturer-spec.js b/spec/api-desktop-capturer-spec.js index 35b7248ed5ee..3dce618de00f 100644 --- a/spec/api-desktop-capturer-spec.js +++ b/spec/api-desktop-capturer-spec.js @@ -18,6 +18,13 @@ describe('desktopCapturer', function () { }) }) + it('throws an error for invalid options', function (done) { + desktopCapturer.getSources(['window', 'screen'], function (error) { + assert.equal(error.message, 'Invalid options') + done() + }) + }) + it('does not throw an error when called more than once (regression)', function (done) { var callCount = 0 var callback = function (error, sources) {