You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/07/16 23:46:10 UTC

[GitHub] [cordova-android] raphinesse commented on a change in pull request #784: Properly handle promise in create script

raphinesse commented on a change in pull request #784: Properly handle promise in create script
URL: https://github.com/apache/cordova-android/pull/784#discussion_r304170735
 
 

 ##########
 File path: bin/lib/create.js
 ##########
 @@ -272,7 +272,7 @@ exports.create = function (project_path, config, options, events) {
     // Make the package conform to Java package types
     return exports.validatePackageName(package_name)
         .then(function () {
-            exports.validateProjectName(project_name);
+            return exports.validateProjectName(project_name);
 
 Review comment:
   We can't do that, since calling the function on the `exports` object is necessary for stubbing via `spyOn` to be possible. The tests actually make use of that too.
   
   `spyOn(create, 'validateProjectName')` in the spec file would stub `exports.validateProjectName` whereas `validateProjectName` would still refer to the original unstubbed function.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org