You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ra...@apache.org on 2018/08/15 21:12:03 UTC

[cordova-lib] branch master updated: Avoid requireNoCache in pkgJson.spec (#647)

This is an automated email from the ASF dual-hosted git repository.

raphinesse pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-lib.git


The following commit(s) were added to refs/heads/master by this push:
     new f8b9f6a  Avoid requireNoCache in pkgJson.spec (#647)
f8b9f6a is described below

commit f8b9f6ab20bc974a61f571384d2a4b26273e7bbd
Author: Raphael von der GrĂ¼n <ra...@gmail.com>
AuthorDate: Wed Aug 15 23:12:00 2018 +0200

    Avoid requireNoCache in pkgJson.spec (#647)
    
    See #644
---
 integration-tests/pkgJson.spec.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/integration-tests/pkgJson.spec.js b/integration-tests/pkgJson.spec.js
index 4806e83..c92580b 100644
--- a/integration-tests/pkgJson.spec.js
+++ b/integration-tests/pkgJson.spec.js
@@ -72,7 +72,7 @@ describe('pkgJson', function () {
     function pluginVersion (pluginName) {
         const p = path.join(project, 'plugins', pluginName, 'package.json');
         expect(p).toExist();
-        return requireNoCache(p).version;
+        return fs.readJsonSync(p).version;
     }
 
     function getPkgJson (propPath) {
@@ -81,7 +81,7 @@ describe('pkgJson', function () {
         return keys.reduce((obj, key) => {
             expect(obj).toBeDefined();
             return obj[key];
-        }, requireNoCache(pkgJsonPath));
+        }, fs.readJsonSync(pkgJsonPath));
     }
 
     function getCfg () {
@@ -260,7 +260,7 @@ describe('pkgJson', function () {
                 }).then(function () {
                     return cordova.plugin('add', PLUGIN, {save: true});
                 }).then(function () {
-                    const iosJson = requireNoCache(path.join(project, 'platforms/ios/ios.json'));
+                    const iosJson = fs.readJsonSync(path.join(project, 'platforms/ios/ios.json'));
                     expect(iosJson.installed_plugins[PLUGIN]).toBeDefined();
 
                     // Check that installed version satisfies the dependency spec


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