From 28c9c4d7308a105e667182adb6770dbb54dbfffd Mon Sep 17 00:00:00 2001 From: daika Date: Tue, 10 Nov 2026 15:51:42 +0700 Subject: [PATCH] test(adsbdb): give the Flights retry case the services enrichment now reads --- src/layers/enrichmentRateLimitRetry.test.mjs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/layers/enrichmentRateLimitRetry.test.mjs b/src/layers/enrichmentRateLimitRetry.test.mjs index 06df7b6485..8f860b2823 100644 --- a/src/layers/enrichmentRateLimitRetry.test.mjs +++ b/src/layers/enrichmentRateLimitRetry.test.mjs @@ -37,6 +37,12 @@ function refusingOnce() { const settle = (ms) => new Promise((done) => setTimeout(done, ms)); +/** The services Flights enrichment reads: neither military nor a TR-3B. */ +const enrichServices = { + militaryRegistry: { isMilitaryIcao: () => false }, + aircraftPresentation: { isTr3b: () => false }, +}; + test('Local ADS-B asks again after a 429 once the refusal has passed', async (t) => { const source = refusingOnce(); const enrichment = createLocalAdsbEnrichment({ source, onChange() {} }); @@ -85,7 +91,11 @@ test('Flights asks again after a 429 once the refusal has passed', async (t) => }, }); t.after(() => flightState.lifetime.abort()); - const enrichment = createEnrichment({ flightState, services: {}, parts: {} }); + const enrichment = createEnrichment({ + flightState, + services: enrichServices, + parts: {}, + }); let applied = null; const ask = () => enrichment._enqueueEnrich(