mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 12:42:06 +00:00
Tests: get electron path using require
This commit is contained in:
@ -2,6 +2,7 @@ const path = require("path");
|
|||||||
|
|
||||||
const getPort = require("get-port");
|
const getPort = require("get-port");
|
||||||
const NodeEnvironment = require("jest-environment-node");
|
const NodeEnvironment = require("jest-environment-node");
|
||||||
|
const electronPath = require("electron");
|
||||||
const { Application } = require("spectron");
|
const { Application } = require("spectron");
|
||||||
|
|
||||||
class TestEnvironment extends NodeEnvironment {
|
class TestEnvironment extends NodeEnvironment {
|
||||||
@ -12,13 +13,6 @@ class TestEnvironment extends NodeEnvironment {
|
|||||||
async setup() {
|
async setup() {
|
||||||
await super.setup();
|
await super.setup();
|
||||||
|
|
||||||
const electronPath = path.resolve(
|
|
||||||
__dirname,
|
|
||||||
"..",
|
|
||||||
"node_modules",
|
|
||||||
".bin",
|
|
||||||
"electron"
|
|
||||||
);
|
|
||||||
const appPath = path.resolve(__dirname, "..");
|
const appPath = path.resolve(__dirname, "..");
|
||||||
const port = await getPort();
|
const port = await getPort();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user