cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stevengill <...@git.apache.org>
Subject [GitHub] cordova-lib pull request #501: CB-11951 CB-11967: Respect preference default...
Date Fri, 14 Oct 2016 00:52:22 GMT
Github user stevengill commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/501#discussion_r83341216
  
    --- Diff: cordova-lib/spec-cordova/plugin.spec.js ---
    @@ -203,6 +204,23 @@ describe('plugin end-to-end', function() {
             .fin(done);
         });
     
    +    it('should respect preference default values', function (done) {    
    +       addPlugin(path.join(pluginsDir, org_test_defaultvariables), org_test_defaultvariables,
{cli_variables: { REQUIRED:'NO', REQUIRED_ANDROID:'NO'}}, done)
    +       .then(function() {
    +            var platformJsonPath = path.join(project, 'plugins', helpers.testPlatform
+ '.json');
    +            var installed_plugins = JSON.parse(fs.readFileSync(platformJsonPath)).installed_plugins;
    --- End diff --
    
    Instead of `JSON.parse` & `fs.readFileSync`, why not use 
    ```var installed_plugins = require('platformJsonPath').installed_plugins;```
    
    That would remove the need to `require('fs')`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message