Spaces:
Paused
Paused
Download server/src/__tests__/documents.test.ts from testfirela/paperclip-app: direct link, hf CLI and curl.
- Browser
- Download file 604 Bytes
-
https://huggingface.co/spaces/testfirela/paperclip-app/resolve/main/server/src/__tests__/documents.test.ts
- Command line
-
hf download hf://spaces/testfirela/paperclip-app/server/src/__tests__/documents.test.ts
-
curl -L -o documents.test.ts https://huggingface.co/spaces/testfirela/paperclip-app/resolve/main/server/src/__tests__/documents.test.ts
604 Bytes
| import { describe, expect, it } from "vitest"; | |
| import { extractLegacyPlanBody } from "../services/documents.js"; | |
| describe("extractLegacyPlanBody", () => { | |
| it("returns null when no plan block exists", () => { | |
| expect(extractLegacyPlanBody("hello world")).toBeNull(); | |
| }); | |
| it("extracts plan body from legacy issue descriptions", () => { | |
| expect( | |
| extractLegacyPlanBody(` | |
| intro | |
| <plan> | |
| # Plan | |
| - one | |
| - two | |
| </plan> | |
| `), | |
| ).toBe("# Plan\n\n- one\n- two"); | |
| }); | |
| it("ignores empty plan blocks", () => { | |
| expect(extractLegacyPlanBody("<plan> </plan>")).toBeNull(); | |
| }); | |
| }); | |