Skip to content

Commit

Permalink
CB-11242: fixed pkgJson.spec.js
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengill committed Apr 28, 2017
1 parent c102eca commit a37b3f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions cordova-lib/integration-tests/pkgJson.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ describe('plugin end-to-end', function() {
var pkgJson;
expect(pkgJsonPath).toExist();

// Add the camera plugin with --save.
return cordova.raw.plugin('add', 'cordova-plugin-camera', {'save':true, 'fetch':true})
// Add the geolocation plugin with --save.
return cordova.raw.plugin('add', 'cordova-plugin-geolocation', {'save':true, 'fetch':true})
.then(function() {
// Add a second plugin without save.
return cordova.raw.plugin('add', pluginId);
Expand All @@ -122,7 +122,7 @@ describe('plugin end-to-end', function() {
pkgJson = cordova_util.requireNoCache(pkgJsonPath);
// Check the plugin add was successful for the first plugin that had --save.
expect(pkgJson).not.toBeUndefined();
expect(pkgJson.cordova.plugins['cordova-plugin-camera']).toBeDefined();
expect(pkgJson.cordova.plugins['cordova-plugin-geolocation']).toBeDefined();
// Expect that the second plugin is not added.
expect(pkgJson.cordova.plugins[pluginId]).toBeUndefined();
}).fail(function(err) {
Expand Down Expand Up @@ -239,7 +239,7 @@ describe('plugin end-to-end', function() {
var engSpec;
var configPlugins = cfg.getPluginIdList();
var configPlugin = cfg.getPlugin(configPlugins);
var pluginPkgJsonDir = path.join(cwd, 'plugins/cordova-plugin-camera/package.json');
var pluginPkgJsonDir = path.join(cwd, 'plugins/cordova-plugin-geolocation/package.json');
var pluginPkgJsonVersion;

// Pkg.json has no platform or plugin or specs.
Expand Down Expand Up @@ -271,8 +271,8 @@ describe('plugin end-to-end', function() {
expect(semver.satisfies(iosVersion.version, elem.spec)).toEqual(true);
});
}).then(function() {
// Add camera plugin with --save --fetch.
return cordova.raw.plugin('add', 'cordova-plugin-camera', {'save':true, 'fetch':true});
// Add geolocation plugin with --save --fetch.
return cordova.raw.plugin('add', 'cordova-plugin-geolocation', {'save':true, 'fetch':true});
}).then(function() {
var cfg3 = new ConfigParser(configXmlPath);
// Check config.xml for plugins and spec.
Expand Down
4 changes: 2 additions & 2 deletions cordova-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@
"scripts": {
"test": "npm run jshint && npm run jasmine",
"test-ios": "npm run test && npm run jasmine-ios",
"ci": "npm run jshint && npm run e2e-tests && snpm run cover && codecov",
"ci": "npm run jshint && npm run e2e-tests && npm run cover && codecov",
"jshint": "jshint src spec-cordova spec-plugman",
"jasmine": "jasmine",
"jasmine-ios": "jasmine spec-cordova/platform.spec.ios.js --matchall",
"cover": "istanbul cover --root src --print detail jasmine",
"e2e-tests" : "jasmine --matchall integration-tests/*"
"e2e-tests" : "jasmine --matchall integration-tests"
},
"contributors": [
{
Expand Down

0 comments on commit a37b3f6

Please sign in to comment.