mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-09-17 16:46:24 +00:00
fix(jobbank-search)!: emit deadline as YYYY-MM-DD in search output
The feed's DD.MM.YYYY parenthetical passed through raw - documented, but contradicting the /scrape contract, every other portal, and this CLI's own detail command for the same job, and ambiguous to a date parser (01.09.2026: 1 Sep or 9 Jan). The known shape converts to ISO; løbende still maps to null; unrecognized shapes pass through for /rank's defensive handling. Breaking for anything parsing the old format - the README's own search example already showed ISO. Review finding F5 (2026-08-19), decision approved by Mads. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
b067928da7
commit
48965960d3
@@ -56,10 +56,17 @@ describe("parseRssDescription", () => {
|
||||
jobType: "Fuldtidsjob, Graduate/trainee",
|
||||
company: "Acme A/S",
|
||||
location: "København",
|
||||
deadline: "31.07.2026",
|
||||
deadline: "2026-07-31",
|
||||
});
|
||||
});
|
||||
|
||||
test("passes an unrecognized deadline shape through for downstream defensive parsing", () => {
|
||||
const parsed = parseRssDescription(
|
||||
"Fuldtidsjob hos Acme A/S, Odense (Ansøgningsfrist: snarest muligt)",
|
||||
);
|
||||
expect(parsed.deadline).toBe("snarest muligt");
|
||||
});
|
||||
|
||||
test("normalizes a rolling deadline to null", () => {
|
||||
expect(
|
||||
parseRssDescription("Deltidsjob hos Example ApS, Aarhus (Ansøgningsfrist: løbende)"),
|
||||
|
||||
Reference in New Issue
Block a user