mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 09:12:18 +00:00
Retain live flights and earthquake observations across globe switches
This commit is contained in:
1 parent
a0e5f04c30
commit
c0062c4d3d
17 files changed
+428
-66
No files matched your search
@@ -92,3 +92,28 @@ test('USGS body completion honors cancellation even with an uncooperative transp
|
||||
name: 'AbortError',
|
||||
});
|
||||
});
|
||||
|
||||
test('an observation received between scenes is queryable and draws without a second fetch', async () => {
|
||||
let resolve, polls = 0;
|
||||
const h = harness({ getSnapshot() {
|
||||
polls++;
|
||||
return new Promise(done => { resolve = done; });
|
||||
} });
|
||||
try {
|
||||
const pending = h.layer.update();
|
||||
h.layer.detachRenderer();
|
||||
assert.equal(h.sources.length, 0);
|
||||
resolve([row]);
|
||||
assert.equal(await pending, true);
|
||||
const [record] = h.layer.getAnalystRecords();
|
||||
assert.equal(record.id, row.usgsId);
|
||||
assert.equal(record.lat, row.lat);
|
||||
assert.equal(h.events.length, 0);
|
||||
h.layer.attachRenderer(h.viewer);
|
||||
assert.equal(h.sources[0].entities.values.length, 1);
|
||||
assert.equal(h.events.length, 1);
|
||||
assert.equal(polls, 1);
|
||||
} finally {
|
||||
h.layer.destroy();
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user