Say undefined where the SMSC named no id for a segment it took (#101)

* Cover the ids a send gets back where the SMSC named only some of them

* Say undefined where the SMSC named no id for a segment it took

* Record why the merger takes the wider type, and de-duplicate the interop narrowing

* Guard the numbering hole the merger must refuse, and correct the phase record
This commit is contained in:
2026-09-12 22:37:55 +02:00
committed by GitHub
parent ca1a7473ed
commit 13e3ff8f1f
12 changed files with 121 additions and 34 deletions
+6 -2
View File
@@ -38,13 +38,17 @@ async function sendAndAwaitDlrs(session: Session, dlrs: Dlr[], message: string):
assert.equal(sent.err, undefined);
const ids = sent.smsIds.filter(id => id !== undefined);
assert.equal(ids.length, sent.smsIds.length, 'expected smscsim to name a message id for every segment');
const complete = await waitFor(() => (
sent.smsIds.every(id => dlrs.some(dlr => dlr.smsId === id)) ? true : undefined
ids.every(id => dlrs.some(dlr => dlr.smsId === id)) ? true : undefined
));
assert.ok(complete, 'every segment of the first send should get a DLR');
return sent.smsIds;
return ids;
}
describe('smscsim - C1 bind, keepalive, unbind', () => {