From 34e5cfdcbe29bbb5f2f46ba54eb67903abd9274d Mon Sep 17 00:00:00 2001 From: amankumarsingh77 Date: Tue, 28 Jul 2026 20:32:57 +0530 Subject: 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) --- test/deep-research/serp-parser-test.ts | 8 -------- 1 file changed, 8 deletions(-) (limited to 'test/deep-research/serp-parser-test.ts') 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"); }); -- cgit v1.2.3