mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-20 22:22:57 +03:00
chore: preserve upstream formatting after base merge
This commit is contained in:
@@ -3339,4 +3339,4 @@
|
||||
"count": 5
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user