fix(native): new lint warnings and the MapLibre protocol type after the dev merge

Awaits that sat in loops in the native-auth tests run together, the hand-off hook marks its navigations as ignored, the native tests drop their non-null assertions, and the offline protocol answers with the data type MapLibre 6.15 expects.
This commit is contained in:
Maurice
2026-10-25 17:16:02 +01:00
parent 8b6a65023f
commit a3b04887a1
6 changed files with 17 additions and 15 deletions
@@ -130,16 +130,17 @@ describe('InMemoryNativeHandoffStore', () => {
it('NATIVE-STORE-001: holds at most its cap of live codes', async () => {
const store = new InMemoryNativeHandoffStore();
const later = Date.now() + 60_000;
for (let i = 0; i < MAX_PENDING_HANDOFFS; i++) {
expect(await store.put(`c${i}`, entry(later))).toBe(true);
}
const stored = await Promise.all(
Array.from({ length: MAX_PENDING_HANDOFFS }, (_, i) => store.put(`c${i}`, entry(later))),
);
expect(stored.every(Boolean)).toBe(true);
expect(await store.put('one-too-many', entry(later))).toBe(false);
});
it('NATIVE-STORE-002: expired codes are dropped on the next write and make room', async () => {
const store = new InMemoryNativeHandoffStore();
const past = Date.now() - 1;
for (let i = 0; i < MAX_PENDING_HANDOFFS; i++) await store.put(`c${i}`, entry(past));
await Promise.all(Array.from({ length: MAX_PENDING_HANDOFFS }, (_, i) => store.put(`c${i}`, entry(past))));
expect(await store.put('fresh', entry(Date.now() + 60_000))).toBe(true);
expect(await store.take('c0')).toBeNull();