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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to