mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-06 11:24:00 +00:00
test(track): stub the geocode proxy routes, not the browser call
Reverse geocoding now goes to /api/google/reverse-geocode on the app server, so the harness stub for maps.googleapis.com never matched and a keyed run would reach Google live. Answer both proxy routes with ZERO_RESULTS instead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
1fffdf7600
commit
26694380fb
1 file changed
+4
-1
@@ -443,7 +443,10 @@ async function main() {
|
|||||||
// for nearby names. Answer both with empty results: the entity-context
|
// for nearby names. Answer both with empty results: the entity-context
|
||||||
// assertions are about the SELECTED contact, and a live lookup would
|
// assertions are about the SELECTED contact, and a live lookup would
|
||||||
// make the run non-hermetic (and bill the owner's Google quota).
|
// make the run non-hermetic (and bill the owner's Google quota).
|
||||||
if (url.hostname === 'maps.googleapis.com' && url.pathname.startsWith('/maps/api/geocode')) {
|
if (
|
||||||
|
isAppRequest &&
|
||||||
|
(url.pathname === '/api/google/reverse-geocode' || url.pathname === '/api/google/geocode')
|
||||||
|
) {
|
||||||
return Promise.resolve(jsonResponse({ status: 'ZERO_RESULTS', results: [] }));
|
return Promise.resolve(jsonResponse({ status: 'ZERO_RESULTS', results: [] }));
|
||||||
}
|
}
|
||||||
if (isAppRequest && url.pathname === '/api/google/nearby-places') {
|
if (isAppRequest && url.pathname === '/api/google/nearby-places') {
|
||||||
|
|||||||
Reference in new issue
Block a user