fixed all src/** tests, moved from spec/src to source code locations

This commit is contained in:
Roman committed 2020-06-25 15:21:28 +03:00
1 parent a772ef6b94
commit 43b3453e24
20 files changed
+167 -160

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
import { Application } from "spectron";
let appPath = ""
switch(process.platform) {
case "win32":
appPath = "./dist/win-unpacked/LensDev.exe"
break
case "linux":
appPath = "./dist/linux-unpacked/kontena-lens"
break
case "darwin":
appPath = "./dist/mac/LensDev.app/Contents/MacOS/LensDev"
break
}
export function setup() {
return new Application({
// path to electron app
args: [],
path: appPath,
startTimeout: 30000,
waitTimeout: 30000,
})
}
export async function tearDown(app: Application) {
const pid = app.mainProcess.pid
await app.stop()
try {
process.kill(pid, 0);
} catch(e) {
return
}
}