Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around npm bug when uninstalling old cordova platforms #78

Merged
merged 1 commit into from Oct 31, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions spec/fetch.spec.js
Expand Up @@ -89,21 +89,21 @@ describe('fetch/uninstall with --save', function () {
it('should fetch and uninstall a cordova platform via npm & git tags/branches', function () {
return Promise.resolve()
// npm tag
.then(_ => fetchAndMatch('cordova-android@5.1.1', {
.then(_ => fetchAndMatch('cordova-android@8.1.0', {
name: 'cordova-android',
version: '5.1.1'
version: '8.1.0'
}))
.then(_ => expectDependenciesToBe({ 'cordova-android': '^5.1.1' }))
.then(_ => expectDependenciesToBe({ 'cordova-android': '^8.1.0' }))
.then(_ => uninstall('cordova-android', tmpDir, opts))
.then(_ => expectDependenciesToBe({}))
.then(_ => expectNotToBeInstalled('cordova-android'))

// git tag
.then(_ => fetchAndMatch('https://github.com/apache/cordova-ios.git#rel/4.1.1', {
.then(_ => fetchAndMatch('https://github.com/apache/cordova-ios.git#rel/5.0.1', {
name: 'cordova-ios',
version: '4.1.1'
version: '5.0.1'
}))
.then(_ => expectDependenciesToBe({ 'cordova-ios': 'git+https://github.com/apache/cordova-ios.git#rel/4.1.1' }))
.then(_ => expectDependenciesToBe({ 'cordova-ios': 'git+https://github.com/apache/cordova-ios.git#rel/5.0.1' }))
.then(_ => uninstall('cordova-ios', tmpDir, opts))
.then(_ => expectDependenciesToBe({}))
.then(_ => expectNotToBeInstalled('cordova-ios'))
Expand Down