fix: create a window capturer correctly (#13689)

* fix: create a window capturer correctly

We were incorrectly creating two screen capturers instead of a window
capturer

* spec: ensure dc tests pass

* spec: enable all tests after verifying dc tests work
This commit is contained in:
Samuel Attard 2018-07-17 14:20:50 +10:00 committed by GitHub
parent ad9e64d086
commit 777d0113d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -69,7 +69,11 @@ describe('desktopCapturer', () => {
return done()
}
const { BrowserWindow } = remote
const w = new BrowserWindow({ width: 200, height: 200 })
desktopCapturer.getSources({types: ['window']}, (error, sources) => {
w.destroy()
expect(error).to.be.null()
expect(sources).to.be.an('array').that.is.not.empty()
for (const {display_id: displayId} of sources) {