Put the submit_sm summary back on the function it describes and tidy the review nits
This commit is contained in:
+3
-1
@@ -104,13 +104,15 @@ describe('README: Client', () => {
|
||||
closeAfter(t, session);
|
||||
|
||||
const reported = once<Dlr>(resolve => { session.on('dlr', resolve); });
|
||||
const { smsIds } = await session.sendSms({
|
||||
const { err: sendErr, smsIds } = await session.sendSms({
|
||||
dlr: true,
|
||||
from: '46701113311',
|
||||
message: 'Hello world',
|
||||
to: '46709771337',
|
||||
});
|
||||
|
||||
assert.equal(sendErr, undefined);
|
||||
assert.equal(smsIds.length, 1);
|
||||
// The generated ids the server answers with read as no notation, so they arrive untouched.
|
||||
assert.equal((await reported).smsId, smsIds[0]);
|
||||
});
|
||||
|
||||
@@ -878,7 +878,6 @@ describe('message id notation', () => {
|
||||
|
||||
assert.ok(checked.err instanceof Error);
|
||||
assert.match(checked.err.message, /smsIdFormat\.receipt/);
|
||||
// The shape todo.md sketched, which a caller without types would otherwise pass unnoticed.
|
||||
assert.ok(checkSessionOptions({ smsIdFormat: 'hex' }).err instanceof Error);
|
||||
assert.match(
|
||||
checkSessionOptions({ smsIdFormat: { receipts: 'decimal' } }).err?.message ?? '',
|
||||
|
||||
Reference in New Issue
Block a user