forked from marktext/marktext
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.js
More file actions
32 lines (30 loc) · 695 Bytes
/
utils.js
File metadata and controls
32 lines (30 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import electron from 'electron'
import { Application } from 'spectron'
export default {
afterEach () {
this.timeout(20000)
if (this.app && this.app.isRunning()) {
return this.app.stop()
}
},
beforeEach () {
this.timeout(20000)
this.app = new Application({
path: electron,
args: ['dist/electron/main.js'],
startTimeout: 20000,
waitTimeout: 20000
})
return this.app.start()
},
beforeXss () {
this.timeout(20000)
this.app = new Application({
path: electron,
args: ['dist/electron/main.js', 'test/e2e/data/xss.md'],
startTimeout: 20000,
waitTimeout: 20000
})
return this.app.start()
}
}