feat(qajobsboard): fetch job detail pages for concrete location text
CI / Linting (Biome) (push) Failing after 40s
CI / Tests (push) Successful in 5m13s
CI / Type Check (adzuna-extractor) (push) Successful in 1m10s
CI / Type Check (gradcracker-extractor) (push) Successful in 1m14s
CI / Type Check (hiringcafe-extractor) (push) Successful in 1m11s
CI / Type Check (orchestrator) (push) Successful in 1m30s
CI / Type Check (startupjobs-extractor) (push) Successful in 1m12s
CI / Type Check (ukvisajobs-extractor) (push) Successful in 1m13s
CI / Documentation (push) Successful in 1m57s
CI / Linting (Biome) (push) Failing after 40s
CI / Tests (push) Successful in 5m13s
CI / Type Check (adzuna-extractor) (push) Successful in 1m10s
CI / Type Check (gradcracker-extractor) (push) Successful in 1m14s
CI / Type Check (hiringcafe-extractor) (push) Successful in 1m11s
CI / Type Check (orchestrator) (push) Successful in 1m30s
CI / Type Check (startupjobs-extractor) (push) Successful in 1m12s
CI / Type Check (ukvisajobs-extractor) (push) Successful in 1m13s
CI / Documentation (push) Successful in 1m57s
The jobs.json feed often labels roles Remote/Worldwide while the public job page JSON-LD and description include the real city (e.g. Mumbai/Nagpur). Enrich vague rows by reading each QAJobsBoard detail URL before import. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
extractJobLocationFromText,
|
||||
parseQaJobDetailPage,
|
||||
} from "../src/detail-page.js";
|
||||
|
||||
const SAMPLE_JSON_LD = `<!DOCTYPE html><html><body>
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org/",
|
||||
"@type": "JobPosting",
|
||||
"title": "Sr. QA Automation Engineer",
|
||||
"description": "<p><strong>Job Location: Mumbai/Nagpur</strong></p><p>India | UK | USA</p>",
|
||||
"jobLocationType": "TELECOMMUTE"
|
||||
}
|
||||
</script>
|
||||
</body></html>`;
|
||||
|
||||
describe("parseQaJobDetailPage", () => {
|
||||
it("extracts job location from JSON-LD description on the detail page", () => {
|
||||
const result = parseQaJobDetailPage(SAMPLE_JSON_LD);
|
||||
expect(result?.location).toBe("Mumbai/Nagpur");
|
||||
expect(result?.jobDescription).toContain("Mumbai/Nagpur");
|
||||
});
|
||||
|
||||
it("extracts job location lines from plain text", () => {
|
||||
expect(
|
||||
extractJobLocationFromText(
|
||||
"Job Location: Vancouver, British Columbia, Canada",
|
||||
),
|
||||
).toBe("Vancouver, British Columbia, Canada");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user