mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix broken test.
This commit is contained in:
@@ -152,16 +152,18 @@ const devModeSendAsync = async function (mail, stream) {
|
||||
let devModeMailId = EmailTest._getAndIncNextDevModeMailId();
|
||||
|
||||
// This approach does not prevent other writers to stdout from interleaving.
|
||||
stream.write('====== BEGIN MAIL #' + devModeMailId + ' ======\n');
|
||||
stream.write(
|
||||
const output = ['====== BEGIN MAIL #' + devModeMailId + ' ======\n'];
|
||||
output.push(
|
||||
'(Mail not sent; to enable sending, set the MAIL_URL ' +
|
||||
'environment variable.)\n'
|
||||
'environment variable.)\n'
|
||||
);
|
||||
const readStream = new MailComposer(mail).compile().createReadStream();
|
||||
readStream.pipe(stream, { end: false });
|
||||
readStream.on('data', buffer => {
|
||||
output.push(buffer.toString());
|
||||
});
|
||||
readStream.on('end', function () {
|
||||
stream.write('====== END MAIL #' + devModeMailId + ' ======\n');
|
||||
resolve();
|
||||
output.push('====== END MAIL #' + devModeMailId + ' ======\n');
|
||||
stream.write(output.join(''), () => resolve());
|
||||
});
|
||||
readStream.on('error', (err) => reject(err));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user