Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

test(tooling): cover visible website labels

Amruth Pillaid17e188b0339
diff --git a/tooling/ats-export-evaluation/fixture.ts b/tooling/ats-export-evaluation/fixture.ts
index 641945229..14ee15845 100644
--- a/tooling/ats-export-evaluation/fixture.ts
+++ b/tooling/ats-export-evaluation/fixture.ts
@@ -34,7 +34,7 @@ const expectedTokens: readonly ExpectedToken[] = [
"mirakova.dev",
"orbit-field-omega",
].map((value) => token(value, "header")),
- ...["Profiles", "OrbitNet", "orbit-profile-omega"].map((value) => token(value, "profiles")),
+ ...["Profiles", "OrbitNet", "orbit-profile-omega", "orbit.example/profile"].map((value) => token(value, "profiles")),
...["Summary"].map((value) => token(value, "summary")),
...[text(SUMMARY_HTML)].map((value) => token(value, "summary")),
...["Experience"].map((value) => token(value, "experience")),
@@ -48,6 +48,7 @@ const expectedTokens: readonly ExpectedToken[] = [
"Principal Reliability Engineer",
"2021 / Present",
text(EXPERIENCE_ROLE_TWO_HTML),
+ "northstar.example/jobs",
].map((value) => token(value, "experience")),
...["Education"].map((value) => token(value, "education")),
...[
@@ -58,6 +59,7 @@ const expectedTokens: readonly ExpectedToken[] = [
"2014 — 2018 (long academic period)",
"東京",
text(EDUCATION_HTML),
+ "u-tokyo.example/program",
].map((value) => token(value, "education")),
...["Skills", "TypeScript", "Advanced", "skill-keyword-alpha", "Kubernetes", "Expert", "skill-keyword-beta"].map(
(value) => token(value, "skills"),
diff --git a/tooling/ats-export-evaluation/metrics.test.ts b/tooling/ats-export-evaluation/metrics.test.ts
index cafcdb98b..30d2ed83c 100644
--- a/tooling/ats-export-evaluation/metrics.test.ts
+++ b/tooling/ats-export-evaluation/metrics.test.ts
@@ -1,5 +1,6 @@
import { describe, expect, it } from "vitest";
-import { evaluateExport } from "./metrics";
+import { createSyntheticCorpus } from "./fixture";
+import { evaluateExport, tokenize } from "./metrics";
const corpus = {
name: "synthetic",
@@ -60,6 +61,24 @@ describe("evaluateExport", () => {
});
});
+ it.each(["orbit.example/profile", "northstar.example/jobs", "u-tokyo.example/program"] as const)(
+ "fails when visible website label %s drops while link targets remain correct",
+ (label) => {
+ const corpus = createSyntheticCorpus("full-width");
+ const paragraphs = corpus.tokens.map((entry) => entry.value);
+ const baseline = evaluateExport(corpus, { paragraphs, links: corpus.links });
+ const dropped = evaluateExport(corpus, {
+ paragraphs: paragraphs.map((paragraph) => (paragraph === label ? "" : paragraph)),
+ links: corpus.links,
+ });
+
+ expect(baseline.links.missing).toEqual([]);
+ expect(baseline.links.unexpected).toEqual([]);
+ expect(dropped.links).toEqual(baseline.links);
+ expect(dropped.duplicates.observed).toBe(baseline.duplicates.observed - tokenize(label).length);
+ },
+ );
+
it("detects a dropped token and an inverted pair", () => {
const result = evaluateExport(corpus, {
paragraphs: ["Bravo", "Alpha"],