windowsInstallerNshSmoke.test.ts 708 B

12345678910111213141516171819202122232425
  1. import { execFileSync } from "node:child_process";
  2. import { resolve } from "node:path";
  3. import { describe, expect, it } from "vitest";
  4. const desktopDir = resolve(import.meta.dirname, "..");
  5. describe.skipIf(process.platform !== "win32")("Windows installer.nsh smoke", () => {
  6. it(
  7. "compiles with electron-builder NSIS and preserves shortcut intent",
  8. () => {
  9. const output = execFileSync(
  10. process.execPath,
  11. [resolve(desktopDir, "scripts/test-installer-nsh-smoke.mjs")],
  12. {
  13. cwd: desktopDir,
  14. encoding: "utf-8",
  15. env: process.env,
  16. },
  17. );
  18. expect(output).toContain("[installer-nsh-smoke] passed");
  19. },
  20. 120_000,
  21. );
  22. });