Skip to content

cleanup: simplify deprecated indication a little #854

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions spec/cordova/platform/listDeprecated.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ describe('cordova/platform/list show deprecated platforms info', function () {
it('shows available platforms with deprecated info', () => {
return platform_list(hooks_mock, projectRoot, { save: true })
.then((result) => {
expect(events.emit).toHaveBeenCalledWith('results', jasmine.stringMatching(/Installed platforms:[\s\S]*Available.*:[\s]*android 1.2.3[\s]*wp7 4.5.6 \(deprecated\)/));
expect(events.emit).toHaveBeenCalledWith('results', jasmine.stringMatching(/Installed platforms:[\s\S]*Available.*:[\s]*android 1.2.3[\s]*wp7 4.5.6 - deprecated/));
});
});

it('returns platform list with deprecated info', function () {
var platformList = ['android 1.2.3', 'wp7 4.5.6'];
expect(platform_list.addDeprecatedInformationToPlatforms(platformList)).toEqual(['android 1.2.3', 'wp7 4.5.6 (deprecated)']);
expect(platform_list.addDeprecatedInformationToPlatforms(platformList)).toEqual(['android 1.2.3', 'wp7 4.5.6 - deprecated']);
});
});
2 changes: 1 addition & 1 deletion src/cordova/platform/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function addDeprecatedInformationToPlatforms (platformsList) {
var platformKey = p.split(' ')[0]; // Remove Version Information
// allow for 'unknown' platforms, which will not exist in platforms
if ((platforms.info[platformKey] || {}).deprecated) {
p = p.concat(' ', '(deprecated)');
p = p.concat(' - deprecated');
}
return p;
});
Expand Down