1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | import { AbstractType } from '@angular/core';
|
8 | import { ChangeDetectorRef } from '@angular/core';
|
9 | import { Compiler } from '@angular/core';
|
10 | import { CompilerOptions } from '@angular/core';
|
11 | import { Component } from '@angular/core';
|
12 | import { ComponentFactory } from '@angular/core';
|
13 | import { ComponentRef } from '@angular/core';
|
14 | import { DebugElement } from '@angular/core';
|
15 | import { Directive } from '@angular/core';
|
16 | import { ElementRef } from '@angular/core';
|
17 | import { InjectFlags } from '@angular/core';
|
18 | import { InjectionToken } from '@angular/core';
|
19 | import { Injector } from '@angular/core';
|
20 | import { NgModule } from '@angular/core';
|
21 | import { NgZone } from '@angular/core';
|
22 | import { Pipe } from '@angular/core';
|
23 | import { PlatformRef } from '@angular/core';
|
24 | import { SchemaMetadata } from '@angular/core';
|
25 | import { Type } from '@angular/core';
|
26 |
|
27 |
|
28 | export declare const __core_private_testing_placeholder__ = "";
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 | export declare function async(fn: Function): (done: any) => any;
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 | export declare class ComponentFixture<T> {
|
56 | componentRef: ComponentRef<T>;
|
57 | ngZone: NgZone | null;
|
58 | private _autoDetect;
|
59 | |
60 |
|
61 |
|
62 | debugElement: DebugElement;
|
63 | |
64 |
|
65 |
|
66 | componentInstance: T;
|
67 | |
68 |
|
69 |
|
70 | nativeElement: any;
|
71 | |
72 |
|
73 |
|
74 | elementRef: ElementRef;
|
75 | |
76 |
|
77 |
|
78 | changeDetectorRef: ChangeDetectorRef;
|
79 | private _renderer;
|
80 | private _isStable;
|
81 | private _isDestroyed;
|
82 | private _resolve;
|
83 | private _promise;
|
84 | private _onUnstableSubscription;
|
85 | private _onStableSubscription;
|
86 | private _onMicrotaskEmptySubscription;
|
87 | private _onErrorSubscription;
|
88 | constructor(componentRef: ComponentRef<T>, ngZone: NgZone | null, _autoDetect: boolean);
|
89 | private _tick;
|
90 | /**
|
91 | * Trigger a change detection cycle for the component.
|
92 | */
|
93 | detectChanges(checkNoChanges?: boolean): void;
|
94 | /**
|
95 | * Do a change detection run to make sure there were no changes.
|
96 | */
|
97 | checkNoChanges(): void;
|
98 | /**
|
99 | * Set whether the fixture should autodetect changes.
|
100 | *
|
101 | * Also runs detectChanges once so that any existing change is detected.
|
102 | */
|
103 | autoDetectChanges(autoDetect?: boolean): void;
|
104 | /**
|
105 | * Return whether the fixture is currently stable or has async tasks that have not been completed
|
106 | * yet.
|
107 | */
|
108 | isStable(): boolean;
|
109 | /**
|
110 | * Get a promise that resolves when the fixture is stable.
|
111 | *
|
112 | * This can be used to resume testing after events have triggered asynchronous activity or
|
113 | * asynchronous change detection.
|
114 | */
|
115 | whenStable(): Promise<any>;
|
116 | private _getRenderer;
|
117 | /**
|
118 | * Get a promise that resolves when the ui state is stable following animations.
|
119 | */
|
120 | whenRenderingDone(): Promise<any>;
|
121 | /**
|
122 | * Trigger component destruction.
|
123 | */
|
124 | destroy(): void;
|
125 | }
|
126 |
|
127 | /**
|
128 | * @publicApi
|
129 | */
|
130 | export declare const ComponentFixtureAutoDetect: InjectionToken<boolean[]>;
|
131 |
|
132 | /**
|
133 | * @publicApi
|
134 | */
|
135 | export declare const ComponentFixtureNoNgZone: InjectionToken<boolean[]>;
|
136 |
|
137 | /**
|
138 | * Discard all remaining periodic tasks.
|
139 | *
|
140 | * @publicApi
|
141 | */
|
142 | export declare function discardPeriodicTasks(): void;
|
143 |
|
144 | /**
|
145 | * Wraps a function to be executed in the fakeAsync zone:
|
146 | * - microtasks are manually executed by calling `flushMicrotasks()`,
|
147 | * - timers are synchronous, `tick()` simulates the asynchronous passage of time.
|
148 | *
|
149 | * If there are any pending timers at the end of the function, an exception will be thrown.
|
150 | *
|
151 | * Can be used to wrap inject() calls.
|
152 | *
|
153 | * @usageNotes
|
154 | * ### Example
|
155 | *
|
156 | * {@example core/testing/ts/fake_async.ts region='basic'}
|
157 | *
|
158 | * @param fn
|
159 | * @returns The function wrapped to be executed in the fakeAsync zone
|
160 | *
|
161 | * @publicApi
|
162 | */
|
163 | export declare function fakeAsync(fn: Function): (...args: any[]) => any;
|
164 |
|
165 | /**
|
166 | * Simulates the asynchronous passage of time for the timers in the fakeAsync zone by
|
167 | * draining the macrotask queue until it is empty. The returned value is the milliseconds
|
168 | * of time that would have been elapsed.
|
169 | *
|
170 | * @param maxTurns
|
171 | * @returns The simulated time elapsed, in millis.
|
172 | *
|
173 | * @publicApi
|
174 | */
|
175 | export declare function flush(maxTurns?: number): number;
|
176 |
|
177 | /**
|
178 | * Flush any pending microtasks.
|
179 | *
|
180 | * @publicApi
|
181 | */
|
182 | export declare function flushMicrotasks(): void;
|
183 |
|
184 | /**
|
185 | * Returns a singleton of the applicable `TestBed`.
|
186 | *
|
187 | * It will be either an instance of `TestBedViewEngine` or `TestBedRender3`.
|
188 | *
|
189 | * @publicApi
|
190 | */
|
191 | export declare const getTestBed: () => TestBed;
|
192 |
|
193 |
|
194 |
|
195 |
|
196 |
|
197 |
|
198 |
|
199 |
|
200 |
|
201 |
|
202 |
|
203 |
|
204 |
|
205 |
|
206 |
|
207 |
|
208 |
|
209 |
|
210 |
|
211 |
|
212 |
|
213 |
|
214 |
|
215 |
|
216 |
|
217 | export declare function inject(tokens: any[], fn: Function): () => any;
|
218 |
|
219 |
|
220 |
|
221 |
|
222 | export declare class InjectSetupWrapper {
|
223 | private _moduleDef;
|
224 | constructor(_moduleDef: () => TestModuleMetadata);
|
225 | private _addModule;
|
226 | inject(tokens: any[], fn: Function): () => any;
|
227 | }
|
228 |
|
229 |
|
230 | /**
|
231 | * Type used for modifications to metadata
|
232 | *
|
233 | * @publicApi
|
234 | */
|
235 | export declare type MetadataOverride<T> = {
|
236 | add?: Partial<T>;
|
237 | remove?: Partial<T>;
|
238 | set?: Partial<T>;
|
239 | };
|
240 |
|
241 |
|
242 |
|
243 |
|
244 |
|
245 |
|
246 |
|
247 | export declare function resetFakeAsyncZone(): void;
|
248 |
|
249 |
|
250 |
|
251 |
|
252 | export declare interface TestBed {
|
253 | platform: PlatformRef;
|
254 | ngModule: Type<any> | Type<any>[];
|
255 | |
256 |
|
257 |
|
258 |
|
259 |
|
260 |
|
261 |
|
262 |
|
263 |
|
264 |
|
265 |
|
266 | initTestEnvironment(ngModule: Type<any> | Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): void;
|
267 | |
268 |
|
269 |
|
270 | resetTestEnvironment(): void;
|
271 | resetTestingModule(): void;
|
272 | configureCompiler(config: {
|
273 | providers?: any[];
|
274 | useJit?: boolean;
|
275 | }): void;
|
276 | configureTestingModule(moduleDef: TestModuleMetadata): void;
|
277 | compileComponents(): Promise<any>;
|
278 | inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue?: T, flags?: InjectFlags): T;
|
279 | inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue: null, flags?: InjectFlags): T | null;
|
280 |
|
281 | get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): any;
|
282 |
|
283 | get(token: any, notFoundValue?: any): any;
|
284 | execute(tokens: any[], fn: Function, context?: any): any;
|
285 | overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): void;
|
286 | overrideComponent(component: Type<any>, override: MetadataOverride<Component>): void;
|
287 | overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): void;
|
288 | overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): void;
|
289 | |
290 |
|
291 |
|
292 | overrideProvider(token: any, provider: {
|
293 | useFactory: Function;
|
294 | deps: any[];
|
295 | }): void;
|
296 | overrideProvider(token: any, provider: {
|
297 | useValue: any;
|
298 | }): void;
|
299 | overrideProvider(token: any, provider: {
|
300 | useFactory?: Function;
|
301 | useValue?: any;
|
302 | deps?: any[];
|
303 | }): void;
|
304 | overrideTemplateUsingTestingModule(component: Type<any>, template: string): void;
|
305 | createComponent<T>(component: Type<T>): ComponentFixture<T>;
|
306 | }
|
307 |
|
308 |
|
309 |
|
310 |
|
311 |
|
312 |
|
313 |
|
314 |
|
315 |
|
316 |
|
317 |
|
318 |
|
319 |
|
320 | export declare const TestBed: TestBedStatic;
|
321 |
|
322 |
|
323 |
|
324 |
|
325 |
|
326 |
|
327 | export declare interface TestBedStatic {
|
328 | new (...args: any[]): TestBed;
|
329 | initTestEnvironment(ngModule: Type<any> | Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): TestBed;
|
330 | |
331 |
|
332 |
|
333 | resetTestEnvironment(): void;
|
334 | resetTestingModule(): TestBedStatic;
|
335 | |
336 |
|
337 |
|
338 |
|
339 | configureCompiler(config: {
|
340 | providers?: any[];
|
341 | useJit?: boolean;
|
342 | }): TestBedStatic;
|
343 | |
344 |
|
345 |
|
346 |
|
347 | configureTestingModule(moduleDef: TestModuleMetadata): TestBedStatic;
|
348 | |
349 |
|
350 |
|
351 |
|
352 |
|
353 | compileComponents(): Promise<any>;
|
354 | overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): TestBedStatic;
|
355 | overrideComponent(component: Type<any>, override: MetadataOverride<Component>): TestBedStatic;
|
356 | overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): TestBedStatic;
|
357 | overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): TestBedStatic;
|
358 | overrideTemplate(component: Type<any>, template: string): TestBedStatic;
|
359 | |
360 |
|
361 |
|
362 |
|
363 |
|
364 |
|
365 | overrideTemplateUsingTestingModule(component: Type<any>, template: string): TestBedStatic;
|
366 | |
367 |
|
368 |
|
369 |
|
370 |
|
371 | overrideProvider(token: any, provider: {
|
372 | useFactory: Function;
|
373 | deps: any[];
|
374 | }): TestBedStatic;
|
375 | overrideProvider(token: any, provider: {
|
376 | useValue: any;
|
377 | }): TestBedStatic;
|
378 | overrideProvider(token: any, provider: {
|
379 | useFactory?: Function;
|
380 | useValue?: any;
|
381 | deps?: any[];
|
382 | }): TestBedStatic;
|
383 | inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue?: T, flags?: InjectFlags): T;
|
384 | inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue: null, flags?: InjectFlags): T | null;
|
385 |
|
386 | get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): any;
|
387 |
|
388 | get(token: any, notFoundValue?: any): any;
|
389 | createComponent<T>(component: Type<T>): ComponentFixture<T>;
|
390 | }
|
391 |
|
392 |
|
393 |
|
394 |
|
395 |
|
396 |
|
397 | export declare class TestComponentRenderer {
|
398 | insertRootElement(rootElementId: string): void;
|
399 | }
|
400 |
|
401 |
|
402 |
|
403 |
|
404 | export declare type TestModuleMetadata = {
|
405 | providers?: any[];
|
406 | declarations?: any[];
|
407 | imports?: any[];
|
408 | schemas?: Array<SchemaMetadata | any[]>;
|
409 | aotSummaries?: () => any[];
|
410 | };
|
411 |
|
412 |
|
413 |
|
414 |
|
415 |
|
416 |
|
417 |
|
418 |
|
419 |
|
420 |
|
421 |
|
422 |
|
423 |
|
424 |
|
425 |
|
426 |
|
427 |
|
428 |
|
429 |
|
430 |
|
431 |
|
432 |
|
433 |
|
434 |
|
435 |
|
436 |
|
437 |
|
438 |
|
439 |
|
440 |
|
441 |
|
442 |
|
443 |
|
444 |
|
445 |
|
446 |
|
447 |
|
448 |
|
449 |
|
450 |
|
451 |
|
452 |
|
453 |
|
454 |
|
455 |
|
456 |
|
457 |
|
458 |
|
459 |
|
460 |
|
461 |
|
462 |
|
463 | export declare function tick(millis?: number, tickOptions?: {
|
464 | processNewMacroTasksSynchronously: boolean;
|
465 | }): void;
|
466 |
|
467 |
|
468 |
|
469 |
|
470 | export declare function withModule(moduleDef: TestModuleMetadata): InjectSetupWrapper;
|
471 |
|
472 | export declare function withModule(moduleDef: TestModuleMetadata, fn: Function): () => any;
|
473 |
|
474 |
|
475 |
|
476 |
|
477 |
|
478 |
|
479 |
|
480 |
|
481 |
|
482 |
|
483 |
|
484 | export declare class ɵangular_packages_core_testing_testing_a implements TestBed {
|
485 | |
486 |
|
487 |
|
488 |
|
489 |
|
490 |
|
491 |
|
492 |
|
493 |
|
494 |
|
495 |
|
496 | static initTestEnvironment(ngModule: Type<any> | Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): ɵangular_packages_core_testing_testing_a;
|
497 | |
498 |
|
499 |
|
500 | static resetTestEnvironment(): void;
|
501 | static resetTestingModule(): TestBedStatic;
|
502 | |
503 |
|
504 |
|
505 |
|
506 | static configureCompiler(config: {
|
507 | providers?: any[];
|
508 | useJit?: boolean;
|
509 | }): TestBedStatic;
|
510 | |
511 |
|
512 |
|
513 |
|
514 | static configureTestingModule(moduleDef: TestModuleMetadata): TestBedStatic;
|
515 | |
516 |
|
517 |
|
518 |
|
519 |
|
520 | static compileComponents(): Promise<any>;
|
521 | static overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): TestBedStatic;
|
522 | static overrideComponent(component: Type<any>, override: MetadataOverride<Component>): TestBedStatic;
|
523 | static overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): TestBedStatic;
|
524 | static overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): TestBedStatic;
|
525 | static overrideTemplate(component: Type<any>, template: string): TestBedStatic;
|
526 | |
527 |
|
528 |
|
529 |
|
530 |
|
531 |
|
532 | static overrideTemplateUsingTestingModule(component: Type<any>, template: string): TestBedStatic;
|
533 | |
534 |
|
535 |
|
536 |
|
537 |
|
538 | static overrideProvider(token: any, provider: {
|
539 | useFactory: Function;
|
540 | deps: any[];
|
541 | }): TestBedStatic;
|
542 | static overrideProvider(token: any, provider: {
|
543 | useValue: any;
|
544 | }): TestBedStatic;
|
545 | static inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue?: T, flags?: InjectFlags): T;
|
546 | static inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue: null, flags?: InjectFlags): T | null;
|
547 |
|
548 | static get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): any;
|
549 | |
550 |
|
551 |
|
552 |
|
553 | static get(token: any, notFoundValue?: any): any;
|
554 | static createComponent<T>(component: Type<T>): ComponentFixture<T>;
|
555 | private _instantiated;
|
556 | private _compiler;
|
557 | private _moduleRef;
|
558 | private _moduleFactory;
|
559 | private _compilerOptions;
|
560 | private _moduleOverrides;
|
561 | private _componentOverrides;
|
562 | private _directiveOverrides;
|
563 | private _pipeOverrides;
|
564 | private _providers;
|
565 | private _declarations;
|
566 | private _imports;
|
567 | private _schemas;
|
568 | private _activeFixtures;
|
569 | private _testEnvAotSummaries;
|
570 | private _aotSummaries;
|
571 | private _templateOverrides;
|
572 | private _isRoot;
|
573 | private _rootProviderOverrides;
|
574 | platform: PlatformRef;
|
575 | ngModule: Type<any> | Type<any>[];
|
576 | |
577 |
|
578 |
|
579 |
|
580 |
|
581 |
|
582 |
|
583 |
|
584 |
|
585 |
|
586 |
|
587 | initTestEnvironment(ngModule: Type<any> | Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): void;
|
588 | |
589 |
|
590 |
|
591 | resetTestEnvironment(): void;
|
592 | resetTestingModule(): void;
|
593 | configureCompiler(config: {
|
594 | providers?: any[];
|
595 | useJit?: boolean;
|
596 | }): void;
|
597 | configureTestingModule(moduleDef: TestModuleMetadata): void;
|
598 | compileComponents(): Promise<any>;
|
599 | private _initIfNeeded;
|
600 | private _createCompilerAndModule;
|
601 | private _assertNotInstantiated;
|
602 | inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue?: T, flags?: InjectFlags): T;
|
603 | inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue: null, flags?: InjectFlags): T | null;
|
604 |
|
605 | get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): any;
|
606 |
|
607 | get(token: any, notFoundValue?: any): any;
|
608 | execute(tokens: any[], fn: Function, context?: any): any;
|
609 | overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): void;
|
610 | overrideComponent(component: Type<any>, override: MetadataOverride<Component>): void;
|
611 | overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): void;
|
612 | overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): void;
|
613 | |
614 |
|
615 |
|
616 | overrideProvider(token: any, provider: {
|
617 | useFactory: Function;
|
618 | deps: any[];
|
619 | }): void;
|
620 | overrideProvider(token: any, provider: {
|
621 | useValue: any;
|
622 | }): void;
|
623 | private overrideProviderImpl;
|
624 | overrideTemplateUsingTestingModule(component: Type<any>, template: string): void;
|
625 | createComponent<T>(component: Type<T>): ComponentFixture<T>;
|
626 | }
|
627 |
|
628 |
|
629 |
|
630 |
|
631 |
|
632 |
|
633 |
|
634 |
|
635 |
|
636 |
|
637 |
|
638 | export declare class ɵangular_packages_core_testing_testing_b implements TestBed {
|
639 | |
640 |
|
641 |
|
642 |
|
643 |
|
644 |
|
645 |
|
646 |
|
647 |
|
648 |
|
649 |
|
650 |
|
651 |
|
652 | static initTestEnvironment(ngModule: Type<any> | Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): TestBed;
|
653 | |
654 |
|
655 |
|
656 |
|
657 |
|
658 | static resetTestEnvironment(): void;
|
659 | static configureCompiler(config: {
|
660 | providers?: any[];
|
661 | useJit?: boolean;
|
662 | }): TestBedStatic;
|
663 | |
664 |
|
665 |
|
666 |
|
667 | static configureTestingModule(moduleDef: TestModuleMetadata): TestBedStatic;
|
668 | |
669 |
|
670 |
|
671 |
|
672 |
|
673 | static compileComponents(): Promise<any>;
|
674 | static overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): TestBedStatic;
|
675 | static overrideComponent(component: Type<any>, override: MetadataOverride<Component>): TestBedStatic;
|
676 | static overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): TestBedStatic;
|
677 | static overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): TestBedStatic;
|
678 | static overrideTemplate(component: Type<any>, template: string): TestBedStatic;
|
679 | |
680 |
|
681 |
|
682 |
|
683 |
|
684 |
|
685 | static overrideTemplateUsingTestingModule(component: Type<any>, template: string): TestBedStatic;
|
686 | static overrideProvider(token: any, provider: {
|
687 | useFactory: Function;
|
688 | deps: any[];
|
689 | }): TestBedStatic;
|
690 | static overrideProvider(token: any, provider: {
|
691 | useValue: any;
|
692 | }): TestBedStatic;
|
693 | static inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue?: T, flags?: InjectFlags): T;
|
694 | static inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue: null, flags?: InjectFlags): T | null;
|
695 |
|
696 | static get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): any;
|
697 |
|
698 | static get(token: any, notFoundValue?: any): any;
|
699 | static createComponent<T>(component: Type<T>): ComponentFixture<T>;
|
700 | static resetTestingModule(): TestBedStatic;
|
701 | platform: PlatformRef;
|
702 | ngModule: Type<any> | Type<any>[];
|
703 | private _compiler;
|
704 | private _testModuleRef;
|
705 | private _activeFixtures;
|
706 | private _globalCompilationChecked;
|
707 | |
708 |
|
709 |
|
710 |
|
711 |
|
712 |
|
713 |
|
714 |
|
715 |
|
716 |
|
717 |
|
718 |
|
719 |
|
720 | initTestEnvironment(ngModule: Type<any> | Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): void;
|
721 | |
722 |
|
723 |
|
724 |
|
725 |
|
726 | resetTestEnvironment(): void;
|
727 | resetTestingModule(): void;
|
728 | configureCompiler(config: {
|
729 | providers?: any[];
|
730 | useJit?: boolean;
|
731 | }): void;
|
732 | configureTestingModule(moduleDef: TestModuleMetadata): void;
|
733 | compileComponents(): Promise<any>;
|
734 | inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue?: T, flags?: InjectFlags): T;
|
735 | inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue: null, flags?: InjectFlags): T | null;
|
736 |
|
737 | get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): any;
|
738 |
|
739 | get(token: any, notFoundValue?: any): any;
|
740 | execute(tokens: any[], fn: Function, context?: any): any;
|
741 | overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): void;
|
742 | overrideComponent(component: Type<any>, override: MetadataOverride<Component>): void;
|
743 | overrideTemplateUsingTestingModule(component: Type<any>, template: string): void;
|
744 | overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): void;
|
745 | overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): void;
|
746 | |
747 |
|
748 |
|
749 | overrideProvider(token: any, provider: {
|
750 | useFactory?: Function;
|
751 | useValue?: any;
|
752 | deps?: any[];
|
753 | }): void;
|
754 | createComponent<T>(type: Type<T>): ComponentFixture<T>;
|
755 | private assertNotInstantiated;
|
756 | |
757 |
|
758 |
|
759 |
|
760 |
|
761 |
|
762 |
|
763 |
|
764 |
|
765 |
|
766 |
|
767 |
|
768 | private checkGlobalCompilationFinished;
|
769 | private destroyActiveFixtures;
|
770 | }
|
771 |
|
772 | export declare function ɵangular_packages_core_testing_testing_c(): ɵangular_packages_core_testing_testing_b;
|
773 |
|
774 | export declare class ɵMetadataOverrider {
|
775 | private _references;
|
776 | |
777 |
|
778 |
|
779 |
|
780 | overrideMetadata<C extends T, T>(metadataClass: {
|
781 | new (options: T): C;
|
782 | }, oldMetadata: C, override: MetadataOverride<T>): C;
|
783 | }
|
784 |
|
785 |
|
786 |
|
787 |
|
788 |
|
789 |
|
790 | export declare class ɵTestingCompiler extends Compiler {
|
791 | get injector(): Injector;
|
792 | overrideModule(module: Type<any>, overrides: MetadataOverride<NgModule>): void;
|
793 | overrideDirective(directive: Type<any>, overrides: MetadataOverride<Directive>): void;
|
794 | overrideComponent(component: Type<any>, overrides: MetadataOverride<Component>): void;
|
795 | overridePipe(directive: Type<any>, overrides: MetadataOverride<Pipe>): void;
|
796 | /**
|
797 | * Allows to pass the compile summary from AOT compilation to the JIT compiler,
|
798 | * so that it can use the code generated by AOT.
|
799 | */
|
800 | loadAotSummaries(summaries: () => any[]): void;
|
801 | /**
|
802 | * Gets the component factory for the given component.
|
803 | * This assumes that the component has been compiled before calling this call using
|
804 | * `compileModuleAndAllComponents*`.
|
805 | */
|
806 | getComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
|
807 | /**
|
808 | * Returns the component type that is stored in the given error.
|
809 | * This can be used for errors created by compileModule...
|
810 | */
|
811 | getComponentFromError(error: Error): Type<any> | null;
|
812 | }
|
813 |
|
814 | /**
|
815 | * A factory for creating a Compiler
|
816 | *
|
817 | * @publicApi
|
818 | */
|
819 | export declare abstract class ɵTestingCompilerFactory {
|
820 | abstract createTestingCompiler(options?: CompilerOptions[]): ɵTestingCompiler;
|
821 | }
|
822 |
|
823 | export { }
|