Skip to content

Commit

Permalink
feat(core): add getSupportedPlatforms method
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed May 20, 2017
1 parent a10d763 commit c8f53d2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/@ionic-native/core/decorators.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -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', () => {
Expand Down
5 changes: 5 additions & 0 deletions src/@ionic-native/core/ionic-native-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,9 @@ export class IonicNativePlugin {
*/
static getPluginInstallName(): string { return; }

/**
* Returns the plugin's supported platforms
*/
static getSupportedPlatforms(): string[] { return; }

}

0 comments on commit c8f53d2

Please sign in to comment.