You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2016/05/13 07:16:07 UTC
cordova-lib git commit: CB-11252 added scoped package test to
cordova-fetch
Repository: cordova-lib
Updated Branches:
refs/heads/master d84f19ce9 -> 9a222aca6
CB-11252 added scoped package test to cordova-fetch
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/9a222aca
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/9a222aca
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/9a222aca
Branch: refs/heads/master
Commit: 9a222aca66497c1678618776c2759216cb053b2d
Parents: d84f19c
Author: Steve Gill <st...@gmail.com>
Authored: Fri May 13 00:16:03 2016 -0700
Committer: Steve Gill <st...@gmail.com>
Committed: Fri May 13 00:16:03 2016 -0700
----------------------------------------------------------------------
cordova-fetch/spec/fetch.spec.js | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/9a222aca/cordova-fetch/spec/fetch.spec.js
----------------------------------------------------------------------
diff --git a/cordova-fetch/spec/fetch.spec.js b/cordova-fetch/spec/fetch.spec.js
index 2f6513a..32fdb98 100644
--- a/cordova-fetch/spec/fetch.spec.js
+++ b/cordova-fetch/spec/fetch.spec.js
@@ -298,3 +298,33 @@ describe('fetch failure with git subdirectory', function () {
.fin(done);
}, 30000);
});
+
+describe('scoped plugin fetch/uninstall tests via npm', function () {
+
+ var tmpDir = helpers.tmpDir('scoped_plug_fetch');
+ var opts = {};
+
+ beforeEach(function() {
+ process.chdir(tmpDir);
+ });
+
+ afterEach(function() {
+ process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows.
+ shell.rm('-rf', tmpDir);
+ });
+
+ it('should fetch a scoped plugin from npm', function(done) {
+ fetch('@stevegill/cordova-plugin-device', tmpDir, opts)
+ .then(function(result) {
+ var pkgJSON = require(path.join(result,'package.json'));
+ expect(result).toBeDefined();
+ expect(fs.existsSync(result)).toBe(true);
+ expect(pkgJSON.name).toBe('@stevegill/cordova-plugin-device');
+ })
+ .fail(function(err) {
+ console.error(err);
+ expect(err).toBeUndefined();
+ })
+ .fin(done);
+ }, 30000);
+});
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org