mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Add failing spec
This commit is contained in:
@@ -11,4 +11,17 @@ describe('desktopCapturer', function() {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('does not throw an error when called twice (regression)', function(done) {
|
||||
var callCount = 0;
|
||||
var callback = function(error, sources) {
|
||||
callCount++;
|
||||
assert.equal(error, null);
|
||||
assert.notEqual(sources.length, 0);
|
||||
if (callCount === 2) done();
|
||||
}
|
||||
|
||||
desktopCapturer.getSources({types: ['window', 'screen']}, callback);
|
||||
desktopCapturer.getSources({types: ['window', 'screen']}, callback);
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user