Skip to content

Conversation

sponte
Copy link
Contributor

@sponte sponte commented Apr 24, 2017

No description provided.

sponte added 2 commits April 24, 2017 13:46
Useful when using MailDev as part of a unit test, otherwise web server prevents test runner from quitting the process
@sponte
Copy link
Contributor Author

sponte commented Apr 24, 2017

Fixes #75

@codecov-io
Copy link

Codecov Report

Merging #165 into master will decrease coverage by 0.16%.
The diff coverage is 40%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #165      +/-   ##
==========================================
- Coverage    60.4%   60.24%   -0.17%     
==========================================
  Files           7        7              
  Lines         490      493       +3     
  Branches      106      108       +2     
==========================================
+ Hits          296      297       +1     
- Misses        194      196       +2
Impacted Files Coverage Δ
index.js 70.27% <40%> (-3.26%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4edecfc...f7e3665. Read the comment docs.

Copy link
Member

@djfarrelly djfarrelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @sponte, thanks for this change. I'm all for it with the small change that I mentioned in my comment. Let me know if you want to tackle that or I should!

web.close
], function(err, results) {
var tasks = [mailserver.end];
if(web) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will always be truthy as it's the module's export object. It could be useful to have a method like web.isListening()?

Now that I think of it, the createServer call in web.js should likely be moved into the start function then the isListening() function can check if server is defined or not. If you'd like to make this change, that works with me or I can hack it together after this is merged. Let me know what you think!

@djfarrelly djfarrelly merged commit f7e3665 into maildev:master May 6, 2017
@djfarrelly
Copy link
Member

@sponte, I made this change I was talking about here: 0fe23ca

This will be in the next release! Thanks for contributing 😄

@sponte
Copy link
Contributor Author

sponte commented May 8, 2017

@djfarrelly sorry for not replying, got lost in my inbox. Thanks for making adjustments and accepting pull request. All the best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants