Skip to content

Commit 6333fa3

Browse files
committed
fix: update test expectations for email-text-tools 2.4.x
The email-text-tools package 2.4.0 removed js-beautify dependency, which was adding trailing newlines to text output. Update test expectations to match the current behavior.
1 parent 0d97b51 commit 6333fa3

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

β€Žtest/api-test.jsβ€Ž

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,7 @@ test('API tests', async t => {
271271

272272
await t.test('retrieve message text', async () => {
273273
const response = await server.get(`/v1/account/${defaultAccountId}/text/${message2.text.id}?textType=*`).expect(200);
274-
// Note: email-text-tools 2.3.5+ adds trailing newlines for better newline preservation
275-
assert.deepEqual(response.body, { plain: 'Hello world! πŸ™ƒ\n', html: '<b>Hello world! πŸ™ƒ</b>\n', hasMore: false });
274+
assert.deepEqual(response.body, { plain: 'Hello world! πŸ™ƒ', html: '<b>Hello world! πŸ™ƒ</b>', hasMore: false });
276275
});
277276

278277
await t.test('download attachment', async () => {
@@ -294,9 +293,8 @@ test('API tests', async t => {
294293
assert.strictEqual(message.id, message2.id);
295294
assert.strictEqual(message.subject, 'Test message 🀣');
296295
assert.strictEqual(message.messageSpecialUse, '\\Inbox');
297-
// Note: email-text-tools 2.3.5+ adds trailing newlines for better newline preservation
298-
assert.strictEqual(message.text.plain, 'Hello world! πŸ™ƒ\n');
299-
assert.strictEqual(message.text.html, '<b>Hello world! πŸ™ƒ</b>\n');
296+
assert.strictEqual(message.text.plain, 'Hello world! πŸ™ƒ');
297+
assert.strictEqual(message.text.html, '<b>Hello world! πŸ™ƒ</b>');
300298
assert.ok(!message.text.webSafe);
301299
});
302300

@@ -308,8 +306,7 @@ test('API tests', async t => {
308306
assert.strictEqual(message.id, message2.id);
309307
assert.strictEqual(message.subject, 'Test message 🀣');
310308
assert.strictEqual(message.messageSpecialUse, '\\Inbox');
311-
// Note: email-text-tools 2.3.5+ adds trailing newlines for better newline preservation
312-
assert.strictEqual(message.text.plain, 'Hello world! πŸ™ƒ\n');
309+
assert.strictEqual(message.text.plain, 'Hello world! πŸ™ƒ');
313310
assert.strictEqual(message.text.html, '<div style="overflow: auto;"><b>Hello world! πŸ™ƒ</b></div>');
314311
assert.strictEqual(message.text.webSafe, true);
315312
});

0 commit comments

Comments
Β (0)