From 0f132fa0e5b65b105bfebc9a123515bd0217a15a Mon Sep 17 00:00:00 2001 From: Mark Stosberg Date: Tue, 6 Oct 2020 14:42:17 -0400 Subject: [PATCH] doc: make the code a little more accessible with some code comments. - Clarify the units of rateInterval - Leave a hint for developers wondering how the test suite supresses actually sending email. --- lib/ses-transport/index.js | 2 +- test/ses-transport/ses-transport-test.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ses-transport/index.js b/lib/ses-transport/index.js index 37dced9f..21efe3c0 100644 --- a/lib/ses-transport/index.js +++ b/lib/ses-transport/index.js @@ -38,7 +38,7 @@ class SESTransport extends EventEmitter { // max messages per second this.sendingRate = Number(this.options.sendingRate) || Infinity; this.sendingRateTTL = null; - this.rateInterval = 1000; + this.rateInterval = 1000; // milliseconds this.rateMessages = []; this.pending = []; diff --git a/test/ses-transport/ses-transport-test.js b/test/ses-transport/ses-transport-test.js index d2fea55d..8c7a9975 100644 --- a/test/ses-transport/ses-transport-test.js +++ b/test/ses-transport/ses-transport-test.js @@ -30,6 +30,7 @@ describe('SES Transport Tests', function() { config: { region: 'eu-west-1' }, + // Prevent tests from actually sending mail by mocking sendRawEmail sendRawEmail: (message, cb) => { setImmediate(() => { cb(null, {