mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
feat(core): add getSupportedPlatforms method
This commit is contained in:
parent
a10d763a41
commit
c8f53d2dc3
@ -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', () => {
|
||||
|
@ -38,4 +38,9 @@ export class IonicNativePlugin {
|
||||
*/
|
||||
static getPluginInstallName(): string { return; }
|
||||
|
||||
/**
|
||||
* Returns the plugin's supported platforms
|
||||
*/
|
||||
static getSupportedPlatforms(): string[] { return; }
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user