mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-11-03 21:43:18 +00:00 
			
		
		
		
	🔥 added test
This commit is contained in:
		
							
								
								
									
										28
									
								
								tests/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								tests/index.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
/* eslint semi: ["error", "never"]*/
 | 
			
		||||
const assert = require('assert')
 | 
			
		||||
const Application = require('spectron').Application
 | 
			
		||||
 | 
			
		||||
describe('application launch', function () {
 | 
			
		||||
  this.timeout(10000)
 | 
			
		||||
 | 
			
		||||
  beforeEach(function () {
 | 
			
		||||
    this.app = new Application({
 | 
			
		||||
      path: __dirname + '/../node_modules/.bin/electron',
 | 
			
		||||
      args: [__dirname + '/../app/main/index.js']
 | 
			
		||||
    })
 | 
			
		||||
    return this.app.start()
 | 
			
		||||
  })
 | 
			
		||||
 | 
			
		||||
  afterEach(function () {
 | 
			
		||||
    if (this.app && this.app.isRunning()) {
 | 
			
		||||
      return this.app.stop()
 | 
			
		||||
    }
 | 
			
		||||
  })
 | 
			
		||||
 | 
			
		||||
  it('shows an initial window', function () {
 | 
			
		||||
    return this.app.client.getWindowCount().then(function (count) {
 | 
			
		||||
      assert.equal(count, 1)
 | 
			
		||||
    })
 | 
			
		||||
  })
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user