fix(recent-imagery): preserve frozen response accessors

This commit is contained in:
brandonabyrd authored and Byrd-IT committed 2026-11-13 17:12:48 -06:00
1 parent b2a6aa4d9f
commit 6b216b3534
2 files changed
+25 -7

No files matched your search

@@ -683,6 +683,23 @@ test('frozen responses retain availability', async () => {
assert.ok((await response.blob()).size);
});
test('frozen native Response retains status and text methods', async () => {
const source = createRecentImagerySource({
thumbnailUrl: () => 'https://example.invalid/',
fetchImpl: async () =>
Object.freeze(
new Response('image', {
status: 200,
headers: { 'Data-Present': 'true' },
}),
),
});
const response = await source.getThumbnail(FIJI_CANDIDATE, EAST_HALF);
assert.equal(response.status, 200);
assert.equal(await response.text(), 'image');
assert.deepEqual(response.presentBoxes, [EAST_HALF]);
});
test('removes previous drape when evidence changes from unknown to empty', () => {
const renderer = createRecentImageryRenderer({ cesium: fakeCesium() });
const globe = fakeCollection();