From f6e86842df4687a16cbf1a2be5a13a8ab03177c0 Mon Sep 17 00:00:00 2001 From: chrisj-er Date: Mon, 5 Oct 2026 09:04:15 -0700 Subject: [PATCH] Fix the date-dependent EventFilter tests and the paginated request open handle The modified-date-range tests used a lower bound that equals the default range on exactly one calendar day, 2026-10-02, so they failed in CI that day. The first-page failure test now gets a 500 handler so its retries fail fast instead of leaving a 120s axios timer open, and it asserts the rejection rather than passing when nothing throws. Co-Authored-By: Claude Fable 5.1 --- src/EventFilter/index.test.js | 4 ++-- src/utils/parallelPaginatedRequest.test.js | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/EventFilter/index.test.js b/src/EventFilter/index.test.js index 10f9cb613..9b7a2825f 100644 --- a/src/EventFilter/index.test.js +++ b/src/EventFilter/index.test.js @@ -308,7 +308,7 @@ describe('EventFilter', () => { }); test('names the dates trigger state while the date range is modified', () => { - store.data.eventFilter.filter.date_range = { lower: '2026-09-01T00:00:00.000Z', upper: null }; + store.data.eventFilter.filter.date_range = { lower: '2020-01-01T00:00:00.000Z', upper: null }; renderEventFilter(); @@ -347,7 +347,7 @@ describe('EventFilter', () => { }); test('offers to reset while the date range is modified', () => { - store.data.eventFilter.filter.date_range = { lower: '2026-09-01T00:00:00.000Z', upper: null }; + store.data.eventFilter.filter.date_range = { lower: '2020-01-01T00:00:00.000Z', upper: null }; renderEventFilter(); diff --git a/src/utils/parallelPaginatedRequest.test.js b/src/utils/parallelPaginatedRequest.test.js index 6ba2f8394..5b3a895dc 100644 --- a/src/utils/parallelPaginatedRequest.test.js +++ b/src/utils/parallelPaginatedRequest.test.js @@ -82,11 +82,10 @@ describe('parallelPaginatedRequest', () => { }); test('throws error if first page can not be resolved', async () => { - try { - await parallelPaginatedRequest(`${EVENTS_API_URL}/notAPage?`); - } catch (e){ - expect(e.message).toBe('Failed to fetch the first page. Aborting.'); - } + server.use(http.get(`${EVENTS_API_URL}/notAPage`, () => new HttpResponse(null, { status: 500 }))); + + await expect(parallelPaginatedRequest(`${EVENTS_API_URL}/notAPage?`)) + .rejects.toThrow('Failed to fetch the first page. Aborting.'); }); });