Collapse the two id emptiness tests into one and pin the reassembler wording

This commit is contained in:
2026-08-27 16:42:26 +02:00
parent cf315737b7
commit 3c6195a938
3 changed files with 3 additions and 5 deletions
+1 -3
View File
@@ -117,7 +117,7 @@ describe('dlrFromPdu()', () => {
assert.equal(dlrFromPdu(deliverSm('id:x stat:DELIVRD done date:2501012560'))?.doneDate, undefined);
});
test('returns nothing when an unmarked deliver_sm identifies no message', () => {
test('returns nothing when an unmarked deliver_sm yields no id or no status', () => {
assert.equal(dlrFromPdu(deliverSm('just a normal sms', undefined, 0)), undefined);
assert.equal(dlrFromPdu(deliverSm('id:0195f0c7 stat:WEIRDXX', undefined, 0)), undefined);
});
@@ -180,8 +180,6 @@ describe('dlrFromPdu()', () => {
assert.equal(empty, undefined, 'an empty id marks nothing');
});
// The spec names six of the sixteen message types and reserves the rest, so a peer that types
// its receipts with one of the reserved bits keeps the body scrape rather than losing them.
test('keeps the body scrape for a message type the spec reserves', () => {
const dlr = dlrFromPdu(deliverSm(receiptText, undefined, 0x0c));