You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
445 B
24 lines
445 B
5 years ago
|
import electron from 'electron'
|
||
|
import { Application } from 'spectron'
|
||
|
|
||
|
export default {
|
||
|
afterEach () {
|
||
|
this.timeout(10000)
|
||
|
|
||
|
if (this.app && this.app.isRunning()) {
|
||
|
return this.app.stop()
|
||
|
}
|
||
|
},
|
||
|
beforeEach () {
|
||
|
this.timeout(10000)
|
||
|
this.app = new Application({
|
||
|
path: electron,
|
||
|
args: ['dist/electron/main.js'],
|
||
|
startTimeout: 10000,
|
||
|
waitTimeout: 10000
|
||
|
})
|
||
|
|
||
|
return this.app.start()
|
||
|
}
|
||
|
}
|