MCPcopy Create free account
hub / github.com/angular/components / setupTest

Function setupTest

src/cdk/a11y/input-modality/input-modality-detector.spec.ts:24–33  ·  view source on GitHub ↗
(isBrowser = true, options: InputModalityDetectorOptions = {})

Source from the content-addressed store, hash-verified

22 let detector: InputModalityDetector;
23
24 function setupTest(isBrowser = true, options: InputModalityDetectorOptions = {}) {
25 TestBed.configureTestingModule({
26 providers: [
27 {provide: Platform, useValue: {isBrowser}},
28 {provide: INPUT_MODALITY_DETECTOR_OPTIONS, useValue: options},
29 ],
30 });
31
32 detector = TestBed.inject(InputModalityDetector);
33 }
34
35 it('should do nothing on non-browser platforms', () => {
36 setupTest(false);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected