28 lines · 1.0 KB · JavaScript
RawDownload
import { assert, describe, it } from "vite-plus/test"; import { makeDevelopmentLauncherScript } from "./electron-launcher.mjs"; describe("electron development launcher", () => {  it("uses captured values only as fallbacks for a live runner environment", () => {    const script = makeDevelopmentLauncherScript({      electronBinaryPath: "/repo/node_modules/electron/Electron",      mainEntryPath: "/repo/apps/desktop/dist-electron/main.cjs",      desktopRoot: "/repo/apps/desktop",      environment: {        VITE_DEV_SERVER_URL: "http://127.0.0.1:8526",        T3CODE_PORT: "16566",        T3CODE_HOME: "/tmp/t3",      },    });     assert.include(      script,      "if [ -z \"${VITE_DEV_SERVER_URL:-}\" ]; then export VITE_DEV_SERVER_URL='http://127.0.0.1:8526'; fi",    );    assert.notInclude(script, "\nexport VITE_DEV_SERVER_URL=");    assert.include(      script,      "exec '/repo/node_modules/electron/Electron' --t3code-dev-root='/repo/apps/desktop' '/repo/apps/desktop/dist-electron/main.cjs' \"$@\"",    );  });});

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t