Skip to content
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