Ignore .paperclip paths in restart tracking
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
0bb1ee3caa
commit
43b21c6033
2 changed files with 9 additions and 1 deletions
|
|
@ -21,6 +21,9 @@ export function shouldTrackDevServerPath(relativePath) {
|
||||||
const segments = normalizedPath.split("/");
|
const segments = normalizedPath.split("/");
|
||||||
const basename = segments.at(-1) ?? normalizedPath;
|
const basename = segments.at(-1) ?? normalizedPath;
|
||||||
|
|
||||||
|
if (segments.includes(".paperclip")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (ignoredTestConfigBasenames.has(basename)) {
|
if (ignoredTestConfigBasenames.has(basename)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,12 @@ import { describe, expect, it } from "vitest";
|
||||||
import { shouldTrackDevServerPath } from "../../../scripts/dev-runner-paths.mjs";
|
import { shouldTrackDevServerPath } from "../../../scripts/dev-runner-paths.mjs";
|
||||||
|
|
||||||
describe("shouldTrackDevServerPath", () => {
|
describe("shouldTrackDevServerPath", () => {
|
||||||
it("ignores common test file paths", () => {
|
it("ignores repo-local Paperclip state and common test file paths", () => {
|
||||||
|
expect(
|
||||||
|
shouldTrackDevServerPath(
|
||||||
|
".paperclip/worktrees/PAP-712-for-project-configuration-get-rid-of-the-overview-tab-for-now/.agents/skills/paperclip",
|
||||||
|
),
|
||||||
|
).toBe(false);
|
||||||
expect(shouldTrackDevServerPath("server/src/__tests__/health.test.ts")).toBe(false);
|
expect(shouldTrackDevServerPath("server/src/__tests__/health.test.ts")).toBe(false);
|
||||||
expect(shouldTrackDevServerPath("packages/shared/src/lib/foo.test.ts")).toBe(false);
|
expect(shouldTrackDevServerPath("packages/shared/src/lib/foo.test.ts")).toBe(false);
|
||||||
expect(shouldTrackDevServerPath("packages/shared/src/lib/foo.spec.tsx")).toBe(false);
|
expect(shouldTrackDevServerPath("packages/shared/src/lib/foo.spec.tsx")).toBe(false);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue