aboutsummaryrefslogtreecommitdiff
path: root/test/deep-research/serp-parser-test.ts
diff options
context:
space:
mode:
authoramankumarsingh77 <amankumarsingh7702@gmail.com>2026-07-28 20:32:57 +0530
committerAman Kumar <145339995+amankumarsingh77@users.noreply.github.com>2026-08-02 19:12:46 +0530
commit34e5cfdcbe29bbb5f2f46ba54eb67903abd9274d (patch)
treef7b421652a7664d97362a308f4a1288cce2ef5b0 /test/deep-research/serp-parser-test.ts
parent91a2fdeff796bae8e87d9146e2d540550f54dd74 (diff)
refactor(test): strip comment noise
Removes suite banners, section dividers, and test-id markers that restate the test names. Keeps one-line notes for the deleted-binary fixture order, the never-arriving event consumer, the absent-vs-undefined key distinction, the unexpected-method-echo rationale, and the real-browser teardown and Local State flush quirks. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'test/deep-research/serp-parser-test.ts')
-rw-r--r--test/deep-research/serp-parser-test.ts8
1 files changed, 0 insertions, 8 deletions
diff --git a/test/deep-research/serp-parser-test.ts b/test/deep-research/serp-parser-test.ts
index af5ac54..433c650 100644
--- a/test/deep-research/serp-parser-test.ts
+++ b/test/deep-research/serp-parser-test.ts
@@ -1,8 +1,3 @@
-/**
- * Unit tests for the pure Google SERP parser — no browser required.
- *
- * Run: npm test
- */
import { test, describe } from "node:test";
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
@@ -17,7 +12,6 @@ const captcha = fixture("google-serp-captcha.json");
const empty = fixture("google-serp-empty.json");
describe("pure Google SERP parser", () => {
- // S1: redirect unwrapping + internal/javascript anchors dropped
test("S1: /url?q= redirect is unwrapped to the real target", () => {
const results = parseGoogleSerp(ok.anchors, 10);
const urls = results.map((r) => r.url);
@@ -36,7 +30,6 @@ describe("pure Google SERP parser", () => {
assert.ok(!urls.some((u) => u.startsWith("javascript:")));
});
- // S2: dedupe + rank + limit
test("S2: trailing-slash duplicate collapses to one result", () => {
const results = parseGoogleSerp(ok.anchors, 10);
const realExampleCount = results.filter((r) => r.url.startsWith("https://real.example/x")).length;
@@ -53,7 +46,6 @@ describe("pure Google SERP parser", () => {
assert.ok(capped.length === 2 && capped[capped.length - 1]?.rank === 2);
});
- // S3: CAPTCHA / no-results classification
test("S3: populated SERP classifies as ok", () => {
assert.equal(classifySerp(ok.pageText, parseGoogleSerp(ok.anchors, 10).length), "ok");
});