cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [31/50] [abbrv] cordova-lib git commit: fixjasmine : CB-12018 : updated jshint and updated jasmine tests to work with jasmine instead of jasmine-node
Date Wed, 18 Jan 2017 01:56:48 GMT
fixjasmine : CB-12018 : updated jshint and updated jasmine tests to work with jasmine instead
of jasmine-node


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

Branch: refs/heads/fetch-1.0.x
Commit: 159b534e9152f602d8ffdf1a0e26625b91a1a680
Parents: b33e222
Author: audreyso <auso@adobe.com>
Authored: Tue Jan 10 10:31:46 2017 -0800
Committer: audreyso <auso@adobe.com>
Committed: Tue Jan 10 17:41:25 2017 -0800

----------------------------------------------------------------------
 cordova-common/package.json                     |  6 +-
 cordova-common/spec/support/jasmine.json        |  8 +++
 cordova-lib/package.json                        |  6 +-
 cordova-lib/spec-cordova/plugin_fetch.spec.js   | 75 ++++++++++----------
 cordova-lib/spec-cordova/prepare.spec.js        | 24 +++----
 cordova-lib/spec-plugman/platforms/ios.spec.js  |  6 +-
 .../spec-plugman/platforms/windows.spec.js      | 67 +++++++----------
 cordova-lib/spec-plugman/platforms/wp8.spec.js  |  5 --
 .../spec-plugman/registry/registry.spec.js      |  4 +-
 cordova-lib/spec/support/jasmine.json           | 13 ++++
 10 files changed, 105 insertions(+), 109 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/159b534e/cordova-common/package.json
----------------------------------------------------------------------
diff --git a/cordova-common/package.json b/cordova-common/package.json
index 98ffb2d..d1eae8a 100644
--- a/cordova-common/package.json
+++ b/cordova-common/package.json
@@ -18,9 +18,9 @@
   },
   "scripts": {
     "test": "npm run jshint && npm run jasmine",
-    "jshint": "node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint
spec",
-    "jasmine": "node node_modules/jasmine-node/bin/jasmine-node --captureExceptions --color
spec",
-    "cover": "node node_modules/istanbul/lib/cli.js cover --root src --print detail node_modules/jasmine-node/bin/jasmine-node
-- spec"
+    "jshint": "jshint src && jshint spec",
+    "jasmine": "jasmine --captureExceptions --color",
+    "cover": "istanbul cover --root src --print detail jasmine"
   },
   "dependencies": {
     "ansi": "^0.3.1",

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/159b534e/cordova-common/spec/support/jasmine.json
----------------------------------------------------------------------
diff --git a/cordova-common/spec/support/jasmine.json b/cordova-common/spec/support/jasmine.json
new file mode 100644
index 0000000..a5605d2
--- /dev/null
+++ b/cordova-common/spec/support/jasmine.json
@@ -0,0 +1,8 @@
+{
+    "spec_dir": "spec",
+    "spec_files": [
+    	"**/*[sS]pec.js"
+    ],
+    "stopSpecOnExpectationFailure": false,
+    "random": false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/159b534e/cordova-lib/package.json
----------------------------------------------------------------------
diff --git a/cordova-lib/package.json b/cordova-lib/package.json
index 8b575f0..5fb2fe0 100644
--- a/cordova-lib/package.json
+++ b/cordova-lib/package.json
@@ -56,9 +56,9 @@
     "test-ios": "npm run test && npm run jasmine-ios",
     "ci": "npm run jshint && npm run cover && codecov",
     "jshint": "jshint src spec-cordova spec-plugman",
-    "jasmine": "jasmine-node --captureExceptions --color spec-plugman spec-cordova",
-    "jasmine-ios": "jasmine-node --captureExceptions --color spec-cordova/platform.spec.ios.js
--matchall",
-    "cover": "istanbul cover --root src --print detail node_modules/jasmine-node/bin/jasmine-node
-- spec-cordova spec-plugman"
+    "jasmine": "jasmine --captureExceptions --color",
+    "jasmine-ios": "jasmine --captureExceptions --color spec-cordova/platform.spec.ios.js
--matchall",
+    "cover": "istanbul cover --root src --print detail jasmine"
   },
   "contributors": [
     {

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/159b534e/cordova-lib/spec-cordova/plugin_fetch.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/plugin_fetch.spec.js b/cordova-lib/spec-cordova/plugin_fetch.spec.js
index e1d58cc..8673484 100644
--- a/cordova-lib/spec-cordova/plugin_fetch.spec.js
+++ b/cordova-lib/spec-cordova/plugin_fetch.spec.js
@@ -89,11 +89,11 @@ function checkUnmetRequirements(requirements) {
             });
         }
     });
-
     expect(reqWarnings.length).toEqual(requirements.length);
 
+
     requirements.forEach(function(requirement) {
-        expect(reqWarnings).toContain(function(extractedWarning) {
+        expect(reqWarnings).toContainArray(function(extractedWarning) {
             return  extractedWarning.dependency === requirement.dependency.trim() &&
                     extractedWarning.installed  === requirement.installed.trim() &&
                     extractedWarning.required   === requirement.required.trim();
@@ -156,19 +156,22 @@ function removeTestProject() {
 
 describe('plugin fetching version selection', function() {
     createTestProject();
-
     beforeEach(function() {
-        // Adding a matcher for checking the array of warning messages so that
-        // we can have meanigful error messages. Expected is passed because
-        // Jasmine will print it out if the matcher fails
         jasmine.addMatchers({
-            toContain: function(check, expected) {
-                for(var i = 0; i < this.actual.length; i++) {
-                    if (check(this.actual[i])) {
-                        return true;
+            'toContainArray': function() {
+                return {
+                    compare: function(actual, expected) {
+                        var result = {};
+                        result.pass = false;
+                        for(var i = 0; i < actual.length; i++) {
+                            if (expected(actual[i])) {
+                                result.pass = true;
+                                break;
+                            }
+                        }
+                        return result;
                     }
-                }
-                return false;
+                };
             }
         });
 
@@ -191,8 +194,7 @@ describe('plugin fetching version selection', function() {
             getPlatformRequirement('6.0.0')
         ]);
         testEngineWithProject(after, testEngine, '1.3.0');
-        done();
-    });
+    }, 6000);
 
     it('Test 002 : should apply upper bound engine constraints when there are no unspecified
constraints above the upper bound', function(done) {
         var testEngine = {
@@ -209,7 +211,6 @@ describe('plugin fetching version selection', function() {
             getPlatformRequirement('6.0.0')
         ]);
         testEngineWithProject(after, testEngine, null);
-        done();
     });
 
     it('Test 003 : should apply upper bound engine constraints when there are unspecified
constraints above the upper bound', function(done) {
@@ -223,7 +224,7 @@ describe('plugin fetching version selection', function() {
             getPlatformRequirement('~5.0.0')
         ]);
         testEngineWithProject(after, testEngine, '1.7.1');
-        done();
+
     });
 
     it('Test 004 : should handle the case where there are no constraints for earliest releases',
function(done) {
@@ -235,7 +236,7 @@ describe('plugin fetching version selection', function() {
             getPlatformRequirement('~5.0.0')
         ]);
         testEngineWithProject(after, testEngine, '0.7.0');
-        done();
+
     });
 
     it('Test 005 : should handle the case where the lowest version is unsatisfied', function(done)
{
@@ -247,7 +248,7 @@ describe('plugin fetching version selection', function() {
             getPlatformRequirement('~5.0.0')
         ]);
         testEngineWithProject(after, testEngine, null);
-        done();
+
     });
 
     it('Test 006 : should handle upperbounds if no single version constraints are given',
function(done) {
@@ -258,7 +259,7 @@ describe('plugin fetching version selection', function() {
         var after = getWarningCheckCallback(done, []);
 
         testEngineWithProject(after, testEngine, '2.3.0');
-        done();
+
     });
 
     it('Test 007 : should apply upper bounds greater than highest version', function(done)
{
@@ -272,7 +273,7 @@ describe('plugin fetching version selection', function() {
         ]);
 
         testEngineWithProject(after, testEngine, null);
-        done();
+
     });
 
     it('Test 008 : should treat empty constraints as satisfied', function(done) {
@@ -286,7 +287,7 @@ describe('plugin fetching version selection', function() {
         ]);
 
         testEngineWithProject(after, testEngine, '1.0.0');
-        done();
+
     });
 
     it('Test 009 : should ignore an empty cordovaDependencies entry', function(done) {
@@ -295,7 +296,7 @@ describe('plugin fetching version selection', function() {
         var after = getWarningCheckCallback(done, []);
 
         testEngineWithProject(after, testEngine, null);
-        done();
+
     });
 
     it('Test 010 : should ignore a badly formatted semver range', function(done) {
@@ -306,7 +307,7 @@ describe('plugin fetching version selection', function() {
         var after = getWarningCheckCallback(done, []);
 
         testEngineWithProject(after, testEngine, '2.3.0');
-        done();
+
     });
 
     it('Test 011 : should respect unreleased versions in constraints', function(done) {
@@ -321,7 +322,7 @@ describe('plugin fetching version selection', function() {
         ]);
 
         testEngineWithProject(after, testEngine, '1.1.0');
-        done();
+
     });
 
     it('Test 012 : should respect plugin constraints', function(done) {
@@ -336,7 +337,7 @@ describe('plugin fetching version selection', function() {
         ]);
 
         testEngineWithProject(after, testEngine, '2.0.0');
-        done();
+
     });
 
     it('Test 013 : should respect cordova constraints', function(done) {
@@ -351,7 +352,7 @@ describe('plugin fetching version selection', function() {
         ]);
 
         testEngineWithProject(after, testEngine, '1.1.0');
-        done();
+
     });
 
     it('Test 014 : should not include pre-release versions', function(done) {
@@ -366,7 +367,7 @@ describe('plugin fetching version selection', function() {
 
         // Should not return 2.0.0-rc.2
         testEngineWithProject(after, testEngine, '1.7.1');
-        done();
+
     });
 
     it('Test 015 : should not fail if there is no engine in the npm info', function(done)
{
@@ -397,7 +398,7 @@ describe('plugin fetching version selection', function() {
             expect(toFetch).toBe(null);
         })
         .fail(getVersionErrorCallback).fin(after);
-        done();
+
     });
 
     it('Test 017 : should handle extra whitespace', function(done) {
@@ -412,7 +413,7 @@ describe('plugin fetching version selection', function() {
         ]);
 
         testEngineWithProject(after, testEngine, '1.7.1');
-        done();
+
     });
 
     it('Test 018 : should ignore badly typed version requirement entries', function(done)
{
@@ -425,7 +426,7 @@ describe('plugin fetching version selection', function() {
         var after = getWarningCheckCallback(done, []);
 
         testEngineWithProject(after, testEngine, '2.3.0');
-        done();
+
     });
 
     it('Test 019 : should ignore badly typed constraint entries', function(done) {
@@ -441,7 +442,7 @@ describe('plugin fetching version selection', function() {
         var after = getWarningCheckCallback(done, []);
 
         testEngineWithProject(after, testEngine, '2.3.0');
-        done();
+
     });
 
     it('Test 020 : should ignore bad semver versions', function(done) {
@@ -451,7 +452,7 @@ describe('plugin fetching version selection', function() {
             '^1.1.2'        : { 'cordova-android': '3.1.0' },
             '<=1.3.0'       : { 'cordova-android': '3.1.0' },
             '1.0'           : { 'cordova-android': '3.1.0' },
-            2               : { 'cordova-android': '3.1.0' }
+            '2'               : { 'cordova-android': '3.1.0' }
         };
 
         var after = getWarningCheckCallback(done, [
@@ -459,7 +460,6 @@ describe('plugin fetching version selection', function() {
         ]);
 
         testEngineWithProject(after, testEngine, null);
-        done();
     });
 
     it('Test 021 : should not fail if there are bad semver versions', function(done) {
@@ -470,7 +470,7 @@ describe('plugin fetching version selection', function() {
             '1.0.0'         : { 'cordova-android': '~3'    },   // Good semver
             '2.0.0'         : { 'cordova-android': '5.1.0' },   // Good semver
             '1.0'           : { 'cordova-android': '3.1.0' },
-            2               : { 'cordova-android': '3.1.0' }
+            '2'               : { 'cordova-android': '3.1.0' }
         };
 
         var after = getWarningCheckCallback(done, [
@@ -478,7 +478,6 @@ describe('plugin fetching version selection', function() {
         ]);
 
         testEngineWithProject(after, testEngine, '1.7.1');
-        done();
     });
 
     it('Test 022 : should properly warn about multiple unmet requirements', function(done)
{
@@ -494,8 +493,8 @@ describe('plugin fetching version selection', function() {
             getPlatformRequirement('>5.1.0'),
             getPluginRequirement('3.1.0')
         ]);
+
         testEngineWithProject(after, testEngine, '1.3.0');
-        done();
     });
 
     it('Test 023 : should properly warn about both unmet latest and upper bound requirements',
function(done) {
@@ -511,8 +510,8 @@ describe('plugin fetching version selection', function() {
             getPlatformRequirement('>5.1.0 AND >7.1.0'),
             getPluginRequirement('3.1.0')
         ]);
+
         testEngineWithProject(after, testEngine, null);
-        done();
     });
 
     it('Test 024 : should not warn about versions past latest', function(done) {
@@ -527,8 +526,8 @@ describe('plugin fetching version selection', function() {
         var after = getWarningCheckCallback(done, [
             getPlatformRequirement('>5.1.0')
         ]);
+
         testEngineWithProject(after, testEngine, '1.3.0');
-        done();
     });
 
     it('Test 025 : clean up after plugin fetch spec', function() {

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/159b534e/cordova-lib/spec-cordova/prepare.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/prepare.spec.js b/cordova-lib/spec-cordova/prepare.spec.js
index 2ac7850..ed740c7 100644
--- a/cordova-lib/spec-cordova/prepare.spec.js
+++ b/cordova-lib/spec-cordova/prepare.spec.js
@@ -154,17 +154,17 @@ describe('prepare command', function() {
                         save: false,
                         fetch: false,
                         paths:
-                         [ '/some/path/platforms/ios/www',
-                           '/some/path/platforms/osx/www',
-                           '/some/path/platforms/android/www',
-                           '/some/path/platforms/ubuntu/www',
-                           '/some/path/platforms/amazon-fireos/www',
-                           '/some/path/platforms/wp8/www',
-                           '/some/path/platforms/blackberry10/www',
-                           '/some/path/platforms/firefoxos/www',
-                           '/some/path/platforms/windows/www',
-                           '/some/path/platforms/webos/www',
-                           '/some/path/platforms/browser/www' ],
+                         [ path.join('/','some','path','platforms','ios','www'),
+                           path.join('/','some','path','platforms','osx','www'),
+                           path.join('/','some','path','platforms','android','www'),
+                           path.join('/','some','path','platforms','ubuntu','www'),
+                           path.join('/','some','path','platforms','amazon-fireos','www'),
+                           path.join('/','some','path','platforms','wp8','www'),
+                           path.join('/','some','path','platforms','blackberry10','www'),
+                           path.join('/','some','path','platforms','firefoxos','www'),
+                           path.join('/','some','path','platforms','windows','www'),
+                           path.join('/','some','path','platforms','webos','www'),
+                           path.join('/','some','path','platforms','browser','www') ],
                         searchpath: undefined } ]);
                 }, function(err) {
                     expect(err).toBeUndefined();
@@ -172,7 +172,7 @@ describe('prepare command', function() {
             });
             it('Test 006 : should fire after hooks through the hooker module, and pass in
platforms and paths as data object', function(done) {
                 prepare('android').then(function() {
-                    expect(fire.calls.argsFor(1)).toEqual([ 'after_prepare',{ platforms:
[ 'android' ],verbose: false,options: {},paths: [ '/some/path/platforms/android/www' ],searchpath:
undefined } ]);
+                    expect(fire.calls.argsFor(1)).toEqual([ 'after_prepare',{ platforms:
[ 'android' ],verbose: false,options: {},paths: [ path.join( '/','some','path', 'platforms',
'android', 'www' ) ],searchpath: undefined } ]);
                 }, function(err) {
                     expect(err).toBeUndefined('Exception while running `prepare android`:\n'
+ err.stack);
                 }).fin(done);

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/159b534e/cordova-lib/spec-plugman/platforms/ios.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/ios.spec.js b/cordova-lib/spec-plugman/platforms/ios.spec.js
index 6407069..fff00c1 100644
--- a/cordova-lib/spec-plugman/platforms/ios.spec.js
+++ b/cordova-lib/spec-plugman/platforms/ios.spec.js
@@ -61,10 +61,6 @@ function copyArray(arr) {
     return Array.prototype.slice.call(arr, 0);
 }
 
-function installPromise(f) {
-    f.then(function(res) { done = true; }, function(err) { done = err; });
-}
-
 function slashJoin() {
     // In some places we need to use forward slash instead of path.join().
     // See CB-7311.
@@ -311,7 +307,7 @@ describe('ios project handler', function() {
                 expect(xcode.hasFile('usr/lib/libsqlite3.dylib')).toBeTruthy();
                 done();
             }).then(function () {
-                return install('ios', temp, dummyplugin)
+                return install('ios', temp, dummyplugin);
             }).then(function () {
                 var xcode = ios.parseProjectFile(temp).xcode;
                 // from org.test.plugins.dummyplugin

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/159b534e/cordova-lib/spec-plugman/platforms/windows.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/windows.spec.js b/cordova-lib/spec-plugman/platforms/windows.spec.js
index 6759bc3..5b68c3d 100644
--- a/cordova-lib/spec-plugman/platforms/windows.spec.js
+++ b/cordova-lib/spec-plugman/platforms/windows.spec.js
@@ -65,7 +65,7 @@ beforeEach(function () {
                     }
                     return result;
                 }
-            }
+            };
         }
     }); 
 });
@@ -487,7 +487,6 @@ beforeEach(function () {
                             var incText = resourcefiles[0].target;
                             var targetConditions = {versions: undefined, deviceTarget: undefined,
arch: 'x86'};
                             validateUninstalledProjects('resource-file', resourcefiles[0],
path, incText, targetConditions, ['all']);
-
                             done();
                         });
                 });
@@ -497,11 +496,9 @@ beforeEach(function () {
                     install('windows', cordovaProjectWindowsPlatformDir, dummyplugin, cordovaProjectPluginsDir,
{})
                         .then(function () {
                             var path = 'ItemGroup/Content';
-
-                            incText = resourcefiles[1].target;
-                            targetConditions = {versions: '>=8.1', deviceTarget: undefined,
arch: undefined};
+                            var incText = resourcefiles[1].target;
+                            var targetConditions = {versions: '>=8.1', deviceTarget: undefined,
arch: undefined};
                             validateUninstalledProjects('resource-file', resourcefiles[1],
path, incText, targetConditions, ['windows', 'phone', 'windows10']);
-
                             done();
                         });
                 });
@@ -511,11 +508,9 @@ beforeEach(function () {
                     install('windows', cordovaProjectWindowsPlatformDir, dummyplugin, cordovaProjectPluginsDir,
{})
                         .then(function () {
                             var path = 'ItemGroup/Content';
-
-                            incText = resourcefiles[2].target;
-                            targetConditions = {versions: undefined, deviceTarget: 'phone',
arch: undefined};
+                            var incText = resourcefiles[2].target;
+                            var targetConditions = {versions: undefined, deviceTarget: 'phone',
arch: undefined};
                             validateUninstalledProjects('resource-file', resourcefiles[2],
path, incText, targetConditions, ['phone']);
-
                             done();
                         });
                 });
@@ -525,10 +520,9 @@ beforeEach(function () {
                     install('windows', cordovaProjectWindowsPlatformDir, dummyplugin, cordovaProjectPluginsDir,
{})
                         .then(function () {
                             var path = 'ItemGroup/Content';
-                            incText = resourcefiles[3].target;
-                            targetConditions = {versions: '8.0', deviceTarget: 'windows',
arch: 'x64'};
+                            var incText = resourcefiles[3].target;
+                            var targetConditions = {versions: '8.0', deviceTarget: 'windows',
arch: 'x64'};
                             validateUninstalledProjects('resource-file', resourcefiles[3],
path, incText, targetConditions, ['windows8']);
-
                             done();
                         });
                 });
@@ -556,8 +550,8 @@ beforeEach(function () {
                     install('windows', cordovaProjectWindowsPlatformDir, dummyplugin, cordovaProjectPluginsDir,
{})
                         .then(function () {
                             var path = 'ItemGroup/SDKReference';
-                            incText = 'TestSDK2, Version=1.0';
-                            targetConditions = {versions: '>=8.1', deviceTarget: undefined,
arch: undefined};
+                            var incText = 'TestSDK2, Version=1.0';
+                            var targetConditions = {versions: '>=8.1', deviceTarget: undefined,
arch: undefined};
                             validateUninstalledProjects('lib-file', libfiles[1], path, incText,
targetConditions, ['windows', 'phone', 'windows10']);
                             done();
                         });
@@ -569,10 +563,9 @@ beforeEach(function () {
                     install('windows', cordovaProjectWindowsPlatformDir, dummyplugin, cordovaProjectPluginsDir,
{})
                         .then(function () {
                             var path = 'ItemGroup/SDKReference';
-                            incText = 'TestSDK3, Version=1.0';
-                            targetConditions = {versions: undefined, deviceTarget: 'phone',
arch: undefined};
+                            var incText = 'TestSDK3, Version=1.0';
+                            var targetConditions = {versions: undefined, deviceTarget: 'phone',
arch: undefined};
                             validateUninstalledProjects('lib-file', libfiles[2], path, incText,
targetConditions, ['phone']);
-
                             done();
                         });
                 });
@@ -583,10 +576,9 @@ beforeEach(function () {
                     install('windows', cordovaProjectWindowsPlatformDir, dummyplugin, cordovaProjectPluginsDir,
{})
                         .then(function () {
                             var path = 'ItemGroup/SDKReference';
-                            incText = 'TestSDK4, Version=1.0';
-                            targetConditions = {versions: '8.0', deviceTarget: 'windows',
arch: 'x86'};
+                            var incText = 'TestSDK4, Version=1.0';
+                            var targetConditions = {versions: '8.0', deviceTarget: 'windows',
arch: 'x86'};
                             validateUninstalledProjects('lib-file', libfiles[3], path, incText,
targetConditions, ['windows8']);
-
                             done();
                         });
                 });
@@ -604,7 +596,6 @@ beforeEach(function () {
                             var incText = 'dummy1';
                             var targetConditions = {versions: undefined, deviceTarget: undefined,
arch: 'x64'};
                             validateUninstalledProjects('framework', frameworks[0], path,
incText, targetConditions, ['all']);
-
                             done();
                         });
                 }, 6000);
@@ -615,10 +606,9 @@ beforeEach(function () {
                     install('windows', cordovaProjectWindowsPlatformDir, dummyplugin, cordovaProjectPluginsDir,
{})
                         .then(function () {
                             var path = 'ItemGroup/Reference';
-                            incText = 'dummy2';
-                            targetConditions = {versions: '>=8.0', deviceTarget: undefined,
arch: undefined};
+                            var incText = 'dummy2';
+                            var targetConditions = {versions: '>=8.0', deviceTarget: undefined,
arch: undefined};
                             validateUninstalledProjects('framework', frameworks[1], path,
incText, targetConditions, ['all']);
-
                             done();
                         });
                 }, 6000);
@@ -629,10 +619,9 @@ beforeEach(function () {
                     install('windows', cordovaProjectWindowsPlatformDir, dummyplugin, cordovaProjectPluginsDir,
{})
                         .then(function () {
                             var path = 'ItemGroup/Reference';
-                            incText = 'dummy3';
-                            targetConditions = {versions: undefined, deviceTarget: 'windows',
arch: undefined};
+                            var incText = 'dummy3';
+                            var targetConditions = {versions: undefined, deviceTarget: 'windows',
arch: undefined};
                             validateUninstalledProjects('framework', frameworks[2], path,
incText, targetConditions, ['windows', 'windows8', 'windows10']);
-
                             done();
                         });
                 }, 6000);
@@ -643,10 +632,9 @@ beforeEach(function () {
                     install('windows', cordovaProjectWindowsPlatformDir, dummyplugin, cordovaProjectPluginsDir,
{})
                         .then(function () {
                             var path = 'ItemGroup/Reference';
-                            incText = 'dummy4';
-                            targetConditions = {versions: '8.1', deviceTarget: 'phone', arch:
'ARM'};
+                            var incText = 'dummy4';
+                            var targetConditions = {versions: '8.1', deviceTarget: 'phone',
arch: 'ARM'};
                             validateUninstalledProjects('framework', frameworks[3], path,
incText, targetConditions, ['phone']);
-
                             done();
                         });
                 }, 6000);
@@ -657,10 +645,9 @@ beforeEach(function () {
                     install('windows', cordovaProjectWindowsPlatformDir, dummyplugin, cordovaProjectPluginsDir,
{})
                         .then(function () {
                             var path = 'ItemGroup/Reference';
-                            incText = 'dummy5';
-                            targetConditions = {versions: undefined, deviceTarget: 'phone',
arch: undefined};
+                            var incText = 'dummy5';
+                            var targetConditions = {versions: undefined, deviceTarget: 'phone',
arch: undefined};
                             validateUninstalledProjects('framework', frameworks[4], path,
incText, targetConditions, ['phone']);
-
                             done();
                         });
                 }, 6000);
@@ -671,10 +658,9 @@ beforeEach(function () {
                     install('windows', cordovaProjectWindowsPlatformDir, dummyplugin, cordovaProjectPluginsDir,
{})
                         .then(function () {
                             var path = 'ItemGroup/Reference';
-                            incText = 'dummy6';
-                            targetConditions = {versions: '>=8.1', deviceTarget: undefined,
arch: undefined};
+                            var incText = 'dummy6';
+                            var targetConditions = {versions: '>=8.1', deviceTarget: undefined,
arch: undefined};
                             validateUninstalledProjects('framework', frameworks[5], path,
incText, targetConditions, ['windows', 'windows10', 'phone']);
-
                             done();
                         });
                 }, 6000);
@@ -703,7 +689,7 @@ beforeEach(function () {
                         .then(function () {
                             var xmlPath = 'ItemGroup/ProjectReference';
                             var incText = windowsJoin(cordovaProjectPluginsDir , dummy_id,
'src', 'windows', 'dummy2.vcxproj');
-                            targetConditions = {versions: '<8.1', deviceTarget: undefined,
arch: undefined};
+                            var targetConditions = {versions: '<8.1', deviceTarget: undefined,
arch: undefined};
                             validateUninstalledProjects('framework', frameworks[7], xmlPath,
incText, targetConditions, ['windows8']);
                             done();
                         });
@@ -716,9 +702,8 @@ beforeEach(function () {
                         .then(function () {
                             var xmlPath = 'ItemGroup/ProjectReference';
                             var incText = windowsJoin(cordovaProjectPluginsDir , dummy_id,
'src', 'windows', 'dummy3.vcxproj');
-                            targetConditions = {versions: undefined, deviceTarget: 'win',
arch: undefined};
+                            var targetConditions = {versions: undefined, deviceTarget: 'win',
arch: undefined};
                             validateUninstalledProjects('framework', frameworks[8], xmlPath,
incText, targetConditions, ['windows', 'windows8', 'windows10']);
-
                             done();
                         });
                 }, 60000);
@@ -730,7 +715,7 @@ beforeEach(function () {
                         .then(function () {
                             var xmlPath = 'ItemGroup/ProjectReference';
                             var incText = windowsJoin(cordovaProjectPluginsDir , dummy_id,
'src', 'windows', 'dummy4.vcxproj');
-                            targetConditions = {versions: '8.1', deviceTarget: 'all', arch:
'x86'};
+                            var targetConditions = {versions: '8.1', deviceTarget: 'all',
arch: 'x86'};
                             validateUninstalledProjects('framework', frameworks[9], xmlPath,
incText, targetConditions, ['windows', 'phone']);
                             done();
                         });

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/159b534e/cordova-lib/spec-plugman/platforms/wp8.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/wp8.spec.js b/cordova-lib/spec-plugman/platforms/wp8.spec.js
index 93d4b22..c0dad0c 100644
--- a/cordova-lib/spec-plugman/platforms/wp8.spec.js
+++ b/cordova-lib/spec-plugman/platforms/wp8.spec.js
@@ -79,11 +79,6 @@ describe('wp8 project handler', function() {
     });
 
     describe('installation', function() {
-        var done;
-        function installPromise(f) {
-            done = false;
-            f.then(function() { done = true; }, function(err) { done = err; });
-        }
         beforeEach(function() {
             shell.mkdir('-p', temp);
         });

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/159b534e/cordova-lib/spec-plugman/registry/registry.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/registry/registry.spec.js b/cordova-lib/spec-plugman/registry/registry.spec.js
index 71c9318..ab1d0fd 100644
--- a/cordova-lib/spec-plugman/registry/registry.spec.js
+++ b/cordova-lib/spec-plugman/registry/registry.spec.js
@@ -71,7 +71,7 @@ describe('registry', function() {
             return registryPromise(false, manifest.generatePackageJsonFromPluginXml(tmp_plugin))
             .then(function(){
                 done();
-            })
+            });
         });
         // Expect the package.json to NOT exist
         it('Test 003 : should generate a package.json if name uses org.apache.cordova.* for
a whitelisted plugin', function(done) {
@@ -89,7 +89,7 @@ describe('registry', function() {
             return registryPromise(false, manifest.generatePackageJsonFromPluginXml(tmp_plugin))
             .then(function(){
                 done();
-            })
+            });
         }, 6000);
     });
     describe('actions', function() {

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/159b534e/cordova-lib/spec/support/jasmine.json
----------------------------------------------------------------------
diff --git a/cordova-lib/spec/support/jasmine.json b/cordova-lib/spec/support/jasmine.json
new file mode 100644
index 0000000..e9d285b
--- /dev/null
+++ b/cordova-lib/spec/support/jasmine.json
@@ -0,0 +1,13 @@
+{
+    "spec_dir": "spec",
+    "spec_files": [
+    	"../spec-cordova/**/*[sS]pec.js",
+    	"../spec-plugman/**/*[sS]pec.js"
+    ],
+    "helpers": [
+      "../spec-cordova/helpers.js",
+      "../spec-cordova/helper.js"
+    ],
+    "stopSpecOnExpectationFailure": false,
+    "random": false
+}


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


Mime
View raw message