tests: derive repo roots from test file locations (#34)
Co-authored-by: VOIDXAI <VOIDXAI@users.noreply.github.com>
This commit is contained in:
parent
9cb4fe4099
commit
19642ad95f
@ -2,8 +2,9 @@ import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const ROOT = "/Users/dkundel/code/codex-plugin";
|
||||
const ROOT = path.resolve(fileURLToPath(new URL("..", import.meta.url)));
|
||||
const PLUGIN_ROOT = path.join(ROOT, "plugins", "codex");
|
||||
|
||||
function read(relativePath) {
|
||||
|
||||
@ -3,13 +3,14 @@ import path from "node:path";
|
||||
import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { spawn } from "node:child_process";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import { buildEnv, installFakeCodex } from "./fake-codex-fixture.mjs";
|
||||
import { initGitRepo, makeTempDir, run } from "./helpers.mjs";
|
||||
import { loadBrokerSession } from "../plugins/codex/scripts/lib/broker-lifecycle.mjs";
|
||||
import { resolveStateDir } from "../plugins/codex/scripts/lib/state.mjs";
|
||||
|
||||
const ROOT = "/Users/dkundel/code/codex-plugin";
|
||||
const ROOT = path.resolve(fileURLToPath(new URL("..", import.meta.url)));
|
||||
const PLUGIN_ROOT = path.join(ROOT, "plugins", "codex");
|
||||
const SCRIPT = path.join(PLUGIN_ROOT, "scripts", "codex-companion.mjs");
|
||||
const STOP_HOOK = path.join(PLUGIN_ROOT, "scripts", "stop-review-gate-hook.mjs");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user