Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions integration-tests/pkgJson.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,15 +372,15 @@ describe('pkgJson', function () {
expect(installedPlatforms()).toEqual([]);

// Add the testing platform with --save and add specific version to android platform.
return cordova.platform('add', ['android@9.0.0', 'ios@6.1.0'], { save: true }).then(function () {
return cordova.platform('add', ['android@9.0.0', 'ios@7.1.1'], { save: true }).then(function () {
expect(installedPlatforms()).toEqual(['android', 'ios']);

// Check the platform add was successful in platforms list and
// dependencies should have specific version from add.
expect(getPkgJson('cordova.platforms')).toEqual(['android', 'ios']);
expect(getPkgJson('devDependencies')).toEqual({
'cordova-android': specWithMinSatisfyingVersion('9.0.0'),
'cordova-ios': specWithMinSatisfyingVersion('6.1.0')
'cordova-ios': specWithMinSatisfyingVersion('7.1.1')
});

expect(getCfg().getEngines()).toEqual([]);
Expand Down Expand Up @@ -430,7 +430,7 @@ describe('pkgJson', function () {
setPkgJson('cordova.platforms', [PLATFORM]);
setPkgJson('devDependencies', {
[PLUGIN]: '^3.2.2',
[`cordova-${PLATFORM}`]: '^6.1.0'
[`cordova-${PLATFORM}`]: '^7.1.1'
});

// config.xml has no platforms or plugins yet.
Expand Down Expand Up @@ -495,17 +495,17 @@ describe('pkgJson', function () {

setPkgJson('cordova.platforms', [PLATFORM]);
setPkgJson('devDependencies', {
[`cordova-${PLATFORM}`]: '^6.1.0',
[`cordova-${PLATFORM}`]: '^7.1.1',
[PLUGIN]: '^3.2.2'
});
getCfg()
.addEngine(PLATFORM, '~6.1.0')
.addEngine(PLATFORM, '~7.1.1')
.addPlugin({ name: PLUGIN, spec: '~3.2.1' })
.write();

expect(installedPlatforms()).toEqual([]);

return cordova.platform('add', `${PLATFORM}@6.1.0`, { save: true }).then(function () {
return cordova.platform('add', `${PLATFORM}@7.1.1`, { save: true }).then(function () {
// Pkg.json has ios.
expect(getPkgJson('cordova.platforms')).toEqual([PLATFORM]);
}).then(function () {
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/plugman_fetch.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const fetch = rewire('../src/plugman/fetch');
const metadata = require('../src/plugman/util/metadata');
const temp = path.join(os.tmpdir(), 'plugman', 'fetch');
const plugins_dir = path.join(__dirname, '..', 'spec', 'plugman', 'plugins');
let test_plugin = path.join(plugins_dir, 'org.test.plugins.childbrowser');
const test_plugin = path.join(plugins_dir, 'org.test.plugins.childbrowser');
const test_pkgjson_plugin = path.join(plugins_dir, 'pkgjson-test-plugin');
const test_plugin_searchpath = path.join(test_plugin, '..');
const test_plugin_id = 'org.test.plugins.childbrowser';
Expand Down Expand Up @@ -115,7 +115,7 @@ describe('fetch', function () {
});
});
it('Test 028 : should fail when locally-available plugin is missing pacakge.json', function () {
test_plugin = path.join(plugins_dir, 'org.test.androidonly');
const test_plugin = path.join(plugins_dir, 'org.test.androidonly');
return expectAsync(
fetch(test_plugin, temp)
).toBeRejectedWithError(/needs a valid package\.json/);
Expand Down
Loading
Loading