Skip to content

Commit

Permalink
doc: make the code a little more accessible with some code comments.
Browse files Browse the repository at this point in the history
 - Clarify the units of rateInterval
 - Leave a hint for developers wondering how the test suite supresses
   actually sending email.
  • Loading branch information
markstos authored and andris9 committed Oct 14, 2020
1 parent 1815bad commit 0f132fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ses-transport/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down
1 change: 1 addition & 0 deletions test/ses-transport/ses-transport-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down

0 comments on commit 0f132fa

Please sign in to comment.