]> khamidou — GitHub mirrors - electron.git/commitdiff
spec: Don't test BrowserWindow.show() in CI
authorCheng Zhao <zcbenz@gmail.com>
Fri, 17 Oct 2014 15:10:10 +0000 (23:10 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 17 Oct 2014 15:38:14 +0000 (23:38 +0800)
Some environments can not handle focusing very well.

spec/api-browser-window-spec.coffee

index ce1a9da1e9b33b0c0f57671807f4d55b9a963991..fa3b69df55e532a7d20ce63ef44e5baf00f62709 100644 (file)
@@ -5,6 +5,8 @@ remote = require 'remote'
 
 BrowserWindow = remote.require 'browser-window'
 
+isCI = remote.process.argv[1] == '--ci'
+
 describe 'browser-window module', ->
   fixtures = path.resolve __dirname, 'fixtures'
 
@@ -58,6 +60,7 @@ describe 'browser-window module', ->
 
   describe 'BrowserWindow.show()', ->
     it 'should focus on window', ->
+      return if isCI
       w.show()
       assert w.isFocused()