Browse Source

Fix specs on Windows when running without desktop session

Cheng Zhao 9 years ago
parent
commit
f65f8918c9
2 changed files with 10 additions and 0 deletions
  1. 6 0
      spec/api-desktop-capturer-spec.js
  2. 4 0
      spec/chromium-spec.js

+ 6 - 0
spec/api-desktop-capturer-spec.js

@@ -1,7 +1,13 @@
 const assert = require('assert')
 const desktopCapturer = require('electron').desktopCapturer
 
+const isCI = require('electron').remote.getGlobal('isCi')
+
 describe('desktopCapturer', function () {
+  if (isCI && process.platform === 'win32') {
+    return
+  }
+
   it('should return a non-empty array of sources', function (done) {
     desktopCapturer.getSources({
       types: ['window', 'screen']

+ 4 - 0
spec/chromium-spec.js

@@ -62,6 +62,10 @@ describe('chromium feature', function () {
       w.loadURL(url)
     })
 
+    if (isCI && process.platform === 'win32') {
+      return
+    }
+
     it('is set correctly when window is inactive', function (done) {
       w = new BrowserWindow({
         show: false