test: prepare for ts4.4

This commit is contained in:
Zack Schuster 2021-09-03 15:22:34 -07:00
parent a2b240d177
commit 4374122320
1 changed files with 14 additions and 2 deletions

View File

@ -365,7 +365,13 @@ test('client send can have result awaited when promisified', async (t) => {
t.true(isRFC2822Date(message.header.date as string));
t.regex(message.header['message-id'] as string, /^<.*[@]{1}.*>$/);
} catch (err) {
t.fail(err);
if (err instanceof Error) {
t.fail(err.message);
} else if (typeof err === 'string') {
t.fail(err);
} else {
t.fail();
}
}
});
@ -394,7 +400,13 @@ test('client sendAsync can have result awaited', async (t) => {
t.true(isRFC2822Date(message.header.date as string));
t.regex(message.header['message-id'] as string, /^<.*[@]{1}.*>$/);
} catch (err) {
t.fail(err);
if (err instanceof Error) {
t.fail(err.message);
} else if (typeof err === 'string') {
t.fail(err);
} else {
t.fail();
}
}
});