import assert from "node:assert/strict";
import test from "node:test";

import { runJudgeSycophancyTest } from "./bench-exploit-audit.ts";

test("runJudgeSycophancyTest uses the configured canary floor", () => {
  const canaryResponse = "A";

  const strict = runJudgeSycophancyTest("synthetic-benchmark", 0.1, canaryResponse);
  const relaxed = runJudgeSycophancyTest("synthetic-benchmark", 0.2, canaryResponse);

  assert.equal(strict.landed, true);
  assert.match(strict.reason, /above floor 0\.100/);
  assert.equal(relaxed.landed, false);
  assert.match(relaxed.reason, /above floor 0\.200/);
});
