chore: preserve upstream formatting after base merge

This commit is contained in:
diegosouzapw
2026-08-08 10:13:38 -03:00
parent ee5f84c168
commit 64c204f68c
2 changed files with 6 additions and 6 deletions

View File

@@ -3339,4 +3339,4 @@
"count": 5
}
}
}
}

View File

@@ -89,10 +89,7 @@ test("Payload normalization produces correct values with real API contract shape
// THE FIX: normalize through body?.data
const payload = (apiResponse as Record<string, unknown>)?.data ?? apiResponse;
const fixedProxies =
(payload as Record<string, unknown>).proxies ??
(payload as Record<string, unknown>).items ??
[];
const fixedProxies = (payload as Record<string, unknown>).proxies ?? (payload as Record<string, unknown>).items ?? [];
const fixedTotal = (payload as Record<string, unknown>).total ?? 0;
assert.equal(fixedProxies.length, 2, "FIX: payload.proxies contains 2 items");
@@ -102,7 +99,10 @@ test("Payload normalization produces correct values with real API contract shape
// Also verify the backend contract is still correct
test("Backend route test asserts body.data.proxies contract", () => {
// Verify the route test asserts data.proxies, not data.items
const routeTestPath = resolve(import.meta.dirname, "./api/free-proxies-list-route.test.ts");
const routeTestPath = resolve(
import.meta.dirname,
"./api/free-proxies-list-route.test.ts"
);
const routeTest = readFileSync(routeTestPath, "utf-8");
assert.ok(
routeTest.includes("body.data.proxies") || routeTest.includes("body.data.total"),