mirror of
https://github.com/marktext/marktext.git
synced 2025-05-03 00:19:35 +08:00

* Fix tests and improve CI * Add xvfb to Linux - still problems with Mocha e2e tests * Disable Webpack Bundle Analyzer for testing * Use preinstalled yarn application on AppVeyor * Fix build failure with latest vue version * Remove "markdown-toc" * Fix application title unit test * Hide electron window during unit tests * Add basic muya unit tests * Dirty markdown-toc replacement * Update dependencies * Update eslint packages and configuration
23 lines
444 B
JavaScript
23 lines
444 B
JavaScript
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()
|
|
}
|
|
}
|