(ids: any[], caps: any)
| 10 | |
| 11 | (function () { |
| 12 | function createExtension(ids: any[], caps: any) { |
| 13 | return new Promise<any>((res, rej) => { |
| 14 | try { |
| 15 | res( |
| 16 | Injector.create({ |
| 17 | providers: [ |
| 18 | ids.map((id) => ({provide: id, useValue: new MockExtension(id)})), |
| 19 | {provide: Options.CAPABILITIES, useValue: caps}, |
| 20 | WebDriverExtension.provideFirstSupported(ids), |
| 21 | ], |
| 22 | }).get(WebDriverExtension), |
| 23 | ); |
| 24 | } catch (e) { |
| 25 | rej(e); |
| 26 | } |
| 27 | }); |
| 28 | } |
| 29 | |
| 30 | describe('WebDriverExtension.provideFirstSupported', () => { |
| 31 | it('should provide the extension that matches the capabilities', (done) => { |
no test coverage detected
searching dependent graphs…