mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-11-08 07:57:40 +00:00
fix(freehire-search): emit the contract's YYYY-MM-DD date instead of the API's ISO timestamp (#621)
toResult passed posted_at through verbatim, so search and detail JSON carried "date": "2026-07-06T00:00:00Z" while every other portal CLI emits the date part only and /scrape stores it as posted_date: "YYYY-MM-DD". The table and plain renderers already cut the value to ten characters, so only JSON consumers - the /scrape path - saw the raw timestamp. Add contractDate(): the timestamp's date part, null for an absent or non-date value. The two tests that pinned the raw timestamp now expect the date and fail on master, plus three cases on the helper. SKILL.md documents the shape.
This commit is contained in:
1 parent
24db6b3b59
commit
1bb3bee2f2
5 files changed
+49
-7
No files matched your search
@@ -98,7 +98,7 @@ describe("runSearch (mocked fetch)", () => {
|
||||
expect(parsed.meta).toEqual({ count: 1, page: 1, total: 42 });
|
||||
expect(parsed.results).toHaveLength(1);
|
||||
expect(parsed.results[0].id).toBe("backend-engineer-acme-ab12cd34");
|
||||
expect(parsed.results[0].date).toBe("2026-07-06T00:00:00Z");
|
||||
expect(parsed.results[0].date).toBe("2026-07-06");
|
||||
});
|
||||
|
||||
test("queries the agent endpoint asking for full descriptions", async () => {
|
||||
|
||||
Reference in new issue
Block a user