Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Introduce Promise chain for some tests. #96

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmuk
Copy link
Contributor

@jmuk jmuk commented Sep 9, 2014

Thinking the current tests are deep, and using Promise would be better. @lavelle, wdyt?

@lavelle
Copy link
Contributor

lavelle commented Sep 9, 2014

Yeah definitely, I was thinking about the callback hell when I was writing the tests, this is definitely more readable. I'd say to add JSDocs to your util method, but other than that looks good to me

@@ -30,9 +30,14 @@ var isRequestValid = function(options) {
return true;
};

var createPromise = function(func, param) {
Copy link
Contributor

Choose a reason for hiding this comment

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

as well as JSDoc I think this would be more readable if these weren't abbreviated. function is a reserved word so I guess func will have to do, but param should probably be parameters to be consistent with the rest of the codebase

@lavelle
Copy link
Contributor

lavelle commented Sep 10, 2014

Would you like me to make these changes?

@jmuk
Copy link
Contributor Author

jmuk commented Sep 10, 2014

will do when I have time. forget this until then.

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

Successfully merging this pull request may close these issues.

2 participants