Name the option a refused address came from, and the data a 0.5.0 consumer stored
Mirror / push (push) Successful in 4s
Test / lint (pull_request) Successful in 20s
Test / test (18) (pull_request) Successful in 35s
Test / test (20) (pull_request) Successful in 30s
Test / test (22) (pull_request) Successful in 29s
Test / test (24) (pull_request) Successful in 29s
Test / test (26) (pull_request) Successful in 30s

This commit is contained in:
2026-09-21 08:14:08 +02:00
parent f870b7530f
commit dc690b912f
6 changed files with 56 additions and 20 deletions
+3 -3
View File
@@ -352,15 +352,15 @@ describe('an address the field cannot carry', () => {
const refusals: [string, RegExp][] = [
['46701113311\u0000EVIL', /U\+0000 at index 11/],
['Kaffe一', /U\+4E00 at index 5/],
['😀', /U\+1F600 at index 0/],
['Kaffe一', /"一" \(U\+4E00\) at index 5/],
['😀', /"😀" \(U\+1F600\) at index 0/],
];
for (const [sender, names] of refusals) {
const sent = await session.sendSms({ from: sender, message: 'Hello world', to });
assert.ok(sent.err instanceof Error, sender);
assert.match(sent.err.message, /source_addr/);
assert.match(sent.err.message, /^from: /, 'names the option the caller wrote, not the wire field');
assert.match(sent.err.message, names);
assert.deepEqual(sent.smsIds, [], sender);
}