feat(core): add getSupportedPlatforms method

This commit is contained in:
Ibby Hadeed 2017-05-20 05:21:27 -04:00
parent a10d763a41
commit c8f53d2dc3
2 changed files with 11 additions and 1 deletions

View File

@ -24,7 +24,8 @@ class TestObject {
pluginName: 'TestPlugin',
pluginRef: 'testPlugin',
repo: '',
plugin: 'cordova-plugin-my-plugin'
plugin: 'cordova-plugin-my-plugin',
platforms: ['Android', 'iOS']
})
class TestPlugin extends IonicNativePlugin {
@ -85,6 +86,10 @@ describe('Regular Decorators', () => {
expect(TestPlugin.getPlugin()).toEqual(window.testPlugin);
});
it('should return supported platforms', () => {
expect(TestPlugin.getSupportedPlatforms()).toEqual(['Android', 'iOS']);
});
});
describe('Cordova', () => {

View File

@ -38,4 +38,9 @@ export class IonicNativePlugin {
*/
static getPluginInstallName(): string { return; }
/**
* Returns the plugin's supported platforms
*/
static getSupportedPlatforms(): string[] { return; }
}