windowsInstallerPreserveFiles.test.ts 628 B

12345678910111213141516
  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 file ownership", () => {
  6. it("preserves files that are absent from the ownership manifest", () => {
  7. const output = execFileSync(
  8. process.execPath,
  9. [resolve(desktopDir, "scripts/test-installer-preserve-files.mjs")],
  10. { cwd: desktopDir, encoding: "utf-8" },
  11. );
  12. expect(output).toContain("[installer-preserve-files] passed");
  13. }, 120_000);
  14. });