pi-ext
bugabingas pi extensions
owned by bugabinga
test(tune): use platform hook paths
de91a246b5404eda43d8b83d2259a5387de4a8b8
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
Browse filesCompare with HEAD
Changed files (2)
extensions/tune/__tests__/remaining.test.ts
Modified138 138 describe(
"hook paths", ()
=> {
139 139 it(
"resolves to .pi/tune/hooks/{stage}.mjs", ()
=> {
140 140 expect(
hookScriptPath(
"/project",
"before")).
toBe(
141 - "/project/.pi/tune/hooks/before.mjs",
141 + path.
join(
"/project",
".pi",
"tune",
"hooks",
"before.mjs"),
143 143 expect(
hookScriptPath(
"/project",
"after")).
toBe(
144 - "/project/.pi/tune/hooks/after.mjs",
144 + path.
join(
"/project",
".pi",
"tune",
"hooks",
"after.mjs"),
extensions/tune/__tests__/unit.test.ts
Modified 1 +import * as path
from "node:path";
1 2 import { DEFAULT_MAX_LINES }
from "@earendil-works/pi-coding-agent";
2 3 import { describe, expect, it }
from "vitest";
3 4 import { buildTuneCompactionSummary }
from "../compaction.ts";
352 353 describe(
"hookScriptPath", ()
=> {
353 354 it(
"resolves to .pi/tune/hooks/{stage}.mjs", ()
=> {
354 355 expect(
hookScriptPath(
"/project",
"before")).
toBe(
355 - "/project/.pi/tune/hooks/before.mjs",
356 + path.
join(
"/project",
".pi",
"tune",
"hooks",
"before.mjs"),
357 358 expect(
hookScriptPath(
"/project",
"after")).
toBe(
358 - "/project/.pi/tune/hooks/after.mjs",
359 + path.
join(
"/project",
".pi",
"tune",
"hooks",
"after.mjs"),