-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Goodparts refactor -- resolves #66 #69
Conversation
Current issue with Travis comes from that same error, |
@Shouston3 would you mind peer-reviewing this PR? (please/thanks!) |
Did you want tests resolved here or in a different pr? This is only meant
to address #66
…On Feb 7, 2017 2:56 AM, "Sam Houston" ***@***.***> wrote:
@newswim <https://github.com/newswim> You are now throwing an Error
object here
<https://github.com/dwyl/sendemail/pull/69/files#diff-6d186b954a58d5bb740f73d84fe39073R19>
instead of a string.
So you should look to handle an object rather than a string in the tests
here
<https://github.com/dwyl/sendemail/blob/master/test/index.test.js#L22>
and in all of the other try catch statments
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#69 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGW7WFExTl5lLPPDs6QJ8vMKB0irqY5jks5raDHRgaJpZM4L5J6g>
.
|
The only way to address the failing tests and throw an error object is to change how we're handling the error in the tests So I'd say change the tests just in regards to reading |
Ah, reread your message, Sam. I'll resolve this tomorrow. Thank you for looking! |
Almost there, I'm not sure about these last two tests. I'll go ahead and push what I've done. Is it normal with tape to get a |
No it should be exit code 0 |
I just realized I'm not testing the
|
Note the |
Also, I think the |
hey @Shouston3, thanks for looking at this. I had changed that because I was getting this error:
This is probably going to take some reworking. |
Got it, |
Looks like an env variable is still not getting set. Sorry to have to leave it like this, be back in a few hours. |
Well.. a little further. There was an error, and I guess I need to get aws keys now.
|
I believe this is now a matter of the env variables within the Travis machine not getting set. see: https://travis-ci.org/dwyl/sendemail/builds/198932105#L126 |
Codecov Report@@ Coverage Diff @@
## master #69 +/- ##
==========================================
- Coverage 100% 96.66% -3.34%
==========================================
Files 1 1
Lines 29 30 +1
==========================================
Hits 29 29
- Misses 0 1 +1
Continue to review full report at Codecov.
|
Hmm.. my guess is that that last test isn't passing because of the other environment variables. I just realized it's late in the day for you guys, so I'll leave this and wait until it has time for review tomorrow. I would also really like to know how environment variables are typically set with Travis (it's my first time using it). I wonder if this has something to do with:
https://docs.travis-ci.com/user/environment-variables/#Defining-public-variables-in-.travis.yml |
@newswim Nice find, I think 'encrypted environment variables not available to forks' seems reasonable, since my tests were passing locally. I think what you added to the |
@newswim you should have access to push your branch to this repo |
test/index.test.js
Outdated
}) | ||
t.end(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing as below here.
You should leave the t.end
inside of the email
function
test/index.test.js
Outdated
}) | ||
t.end() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't put the t.end
callback outside of the email function.
It will cause it to run immediately and not wait to test what is returned from the email
function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@newswim I'd say invoke the t.end
inside the email
callback from the comments above and remove the global environment variable from travis.yml
, then I think it's good to merge 👍
Thanks Sam, I'll initiate a new PR from the this repo rather than my fork. Feel free to close 🔚 |
Closing see #70 instead |
Just one hanging point of review for me. On line 57, i wasn't totally sure about the {returns} value for JSDoc. Next time before tackling something like this, I should read over the source code (and readme) fully. If someone doesn't mind double checking me 🏁 --- that would make you the best 🏆