feat(core): add getSupportedPlatforms method
This commit is contained in:
parent
a10d763a41
commit
c8f53d2dc3
@ -24,7 +24,8 @@ class TestObject {
|
|||||||
pluginName: 'TestPlugin',
|
pluginName: 'TestPlugin',
|
||||||
pluginRef: 'testPlugin',
|
pluginRef: 'testPlugin',
|
||||||
repo: '',
|
repo: '',
|
||||||
plugin: 'cordova-plugin-my-plugin'
|
plugin: 'cordova-plugin-my-plugin',
|
||||||
|
platforms: ['Android', 'iOS']
|
||||||
})
|
})
|
||||||
class TestPlugin extends IonicNativePlugin {
|
class TestPlugin extends IonicNativePlugin {
|
||||||
|
|
||||||
@ -85,6 +86,10 @@ describe('Regular Decorators', () => {
|
|||||||
expect(TestPlugin.getPlugin()).toEqual(window.testPlugin);
|
expect(TestPlugin.getPlugin()).toEqual(window.testPlugin);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should return supported platforms', () => {
|
||||||
|
expect(TestPlugin.getSupportedPlatforms()).toEqual(['Android', 'iOS']);
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Cordova', () => {
|
describe('Cordova', () => {
|
||||||
|
@ -38,4 +38,9 @@ export class IonicNativePlugin {
|
|||||||
*/
|
*/
|
||||||
static getPluginInstallName(): string { return; }
|
static getPluginInstallName(): string { return; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the plugin's supported platforms
|
||||||
|
*/
|
||||||
|
static getSupportedPlatforms(): string[] { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user