mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-07 23:03:19 +08:00
![Eric Horodyski](/assets/img/avatar_default.png)
* Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options.
31 lines
856 B
TypeScript
31 lines
856 B
TypeScript
import { InAppBrowser, InAppBrowserEvent, InAppBrowserOptions } from '../../src/plugins/inappbrowser';
|
|
|
|
declare var window: any;
|
|
|
|
window.cordova = {
|
|
InAppBrowser: {
|
|
open: window.open
|
|
}
|
|
};
|
|
|
|
describe('InAppBrowser', () => {
|
|
|
|
const options: InAppBrowserOptions = { hidden: 'yes', hardwareback: 'no' };
|
|
let object;
|
|
|
|
it('should create an object using strings and InAppBrowserOptions signature', () => {
|
|
object = new InAppBrowser('http://google.com', '_self', options);
|
|
expect(object).toBeDefined();
|
|
});
|
|
|
|
it('should create an object using string only signature', () => {
|
|
object = new InAppBrowser('http://google.com', '_self', 'location=no');
|
|
expect(object).toBeDefined();
|
|
});
|
|
|
|
it('should create an object with the least amount of parameters', () => {
|
|
object = new InAppBrowser('http://google.com');
|
|
expect(object).toBeDefined();
|
|
});
|
|
});
|