Skip to content

Commit 65d262a

Browse files
committed
REG-34: Reverse new mailtrap breakage
1 parent df371ae commit 65d262a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

support/mailtrap.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const mailtrapClient = axios.create({
1616
* Makes an authenticated GET call to Mailtrap.io's API.
1717
*
1818
* @param {string} path Request path
19-
* @param {array} responseType Deserialised response data
19+
* @param {string} responseType Deserialised response data
2020
*/
2121
async function mailtrapGet(path, responseType) {
2222
const response = await mailtrapClient.get(path, { responseType });
@@ -36,7 +36,7 @@ async function getLatestMessages(toEmailAddress) {
3636

3737
const params = new URLSearchParams({ search: toEmailAddress });
3838
const path = `/api/v1/inboxes/${process.env.MAILTRAP_INBOX_ID}/messages?${params.toString()}`;
39-
const messages = await mailtrapGet(path, ['json']);
39+
const messages = await mailtrapGet(path, 'json');
4040
console.log(`got ${messages.length} message(s) from mailtrap at path ${path}`);
4141

4242
if (messages.length === 0) {
@@ -69,7 +69,7 @@ export async function checkAnEmailBodyContainsText(searchText, toEmailAddress) {
6969
// where all bodies are got in one go would be slightly better, but is not a big
7070
// optimisation. For now, let's skip the eslint check for this line.
7171
// eslint-disable-next-line no-await-in-loop
72-
body = await mailtrapGet(messages[ii].html_path, ['document']);
72+
body = await mailtrapGet(messages[ii].html_path, 'document');
7373
if (body.includes(searchText)) {
7474
return true;
7575
}

0 commit comments

Comments
 (0)