Skip to content

armgit / hypit

Public Imported from GitHub
0

Clone any viral video with AI agents. Not just a script, the whole workflow: swap the face, the words, the B-roll, ship 100 variants in one command, and get your 100M views.

659 B
Raw Blame
import assert from "node:assert/strict";
import test from "node:test";
import { stopProcessTree } from "../src/process-control.js";

test("a process-group permission error still tries the owned process", { skip: process.platform === "win32" }, async (t) => {
  const targets: number[] = [];
  t.mock.method(process, "kill", (target: number, signal?: NodeJS.Signals | number) => {
    if (signal === 0) return true;
    targets.push(target);
    if (target < 0) throw Object.assign(new Error("group signal denied"), { code: "EPERM" });
    return true;
  });
  assert.equal(await stopProcessTree(4242), "sent");
  assert.deepEqual(targets, [-4242, 4242]);
});