MCPcopy
hub / github.com/angular/angular / createExtension

Function createExtension

packages/benchpress/test/web_driver_extension_spec.ts:12–28  ·  view source on GitHub ↗
(ids: any[], caps: any)

Source from the content-addressed store, hash-verified

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) => {

Callers 1

Calls 3

mapMethod · 0.80
getMethod · 0.65
createMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…