fuck this

This commit is contained in:
Core 2022-02-01 12:27:16 +00:00
parent 4bc766feb1
commit fdf2b84178
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6

View file

@ -1,21 +1,21 @@
import { _electron as electron } from "playwright";
import { test, expect } from "@playwright/test";
import { join } from "path";
import { resolve } from "path";
import * as fs from "fs";
test("Launch electron app", async () => {
const paths = {
"mainBuild": join(__dirname, "../../build/"),
"main": join(__dirname, "../main"),
"root": join(__dirname, "../../"),
"mainBuild": resolve(__dirname, "../../build/"),
"main": resolve(__dirname, "../main"),
"root": resolve(__dirname, "../../"),
}
console.log(paths)
console.log(fs.readdirSync(paths.main))
const electronApp = await electron.launch({ args: ['main.js'] });
const electronApp = await electron.launch({ args: ['build/index.js'], cwd: paths.root });
const appPath = await electronApp.evaluate(async ({ app }) => {
// This runs in the main Electron process, parameter here is always