Repository: cordova-lib
Updated Branches:
  refs/heads/master e8d02c251 -> b82ee86c3


Remove require('fs') from plugin.spec.js

 This closes #501


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/b82ee86c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/b82ee86c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/b82ee86c

Branch: refs/heads/master
Commit: b82ee86c382e8b94ad750121f4a3a3e6f1d3f6fb
Parents: afcffc5
Author: Nikita Matrosov <matrosov.nikit...@gmail.com>
Authored: Fri Oct 14 11:35:12 2016 +0300
Committer: Steve Gill <stevengil...@gmail.com>
Committed: Fri Oct 14 17:49:33 2016 -0700

----------------------------------------------------------------------
 cordova-lib/spec-cordova/plugin.spec.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b82ee86c/cordova-lib/spec-cordova/plugin.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/plugin.spec.js 
b/cordova-lib/spec-cordova/plugin.spec.js
index 7de1a0c..ae99c46 100644
--- a/cordova-lib/spec-cordova/plugin.spec.js
+++ b/cordova-lib/spec-cordova/plugin.spec.js
@@ -20,7 +20,6 @@
 var helpers = require('./helpers'),
     path = require('path'),
     Q = require('q'),
-    fs = require('fs'),
     shell = require('shelljs'),
     events = require('cordova-common').events,
     cordova = require('../src/cordova/cordova'),
@@ -208,7 +207,7 @@ describe('plugin end-to-end', function() {
        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;
+            var installed_plugins = 
require(platformJsonPath).installed_plugins;
             var defaultPluginPreferences = 
installed_plugins[org_test_defaultvariables];
             expect(defaultPluginPreferences).toBeDefined();
             expect(defaultPluginPreferences.DEFAULT).toBe('yes');


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

Reply via email to