|
6 | 6 | * found in the LICENSE file at https://angular.io/license
|
7 | 7 | */
|
8 | 8 |
|
9 |
| -<<<<<<< HEAD |
10 |
| -import {Compiler, Component, Directive, ErrorHandler, Inject, Injectable, InjectionToken, Injector, Input, ModuleWithProviders, NgModule, Optional, Pipe, getModuleFactory, ɵsetClassMetadata as setClassMetadata, ɵɵdefineComponent as defineComponent, ɵɵdefineNgModule as defineNgModule, ɵɵtext as text} from '@angular/core'; |
11 |
| -import {registerModuleFactory} from '@angular/core/src/linker/ng_module_factory_registration'; |
12 |
| -import {NgModuleFactory} from '@angular/core/src/render3'; |
13 |
| -======= |
14 |
| -import {Compiler, Component, Directive, ErrorHandler, Inject, Injectable, InjectionToken, Input, ModuleWithProviders, NgModule, Optional, Pipe, getModuleFactory, ɵsetClassMetadata as setClassMetadata, ɵɵdefineComponent as defineComponent, ɵɵdefineNgModule as defineNgModule, ɵɵtext as text} from '@angular/core'; |
15 |
| ->>>>>>> parent of 63256b511a... fix(ivy): Only restore registered modules if user compiles modules with TestBed (#32944) |
| 9 | +import {Compiler, Component, Directive, ErrorHandler, Inject, Injectable, InjectionToken, Injector, Input, ModuleWithProviders, NgModule, Optional, Pipe, ɵsetClassMetadata as setClassMetadata, ɵɵdefineComponent as defineComponent, ɵɵdefineNgModule as defineNgModule, ɵɵtext as text} from '@angular/core'; |
16 | 10 | import {TestBed, getTestBed} from '@angular/core/testing/src/test_bed';
|
17 | 11 | import {By} from '@angular/platform-browser';
|
18 | 12 | import {expect} from '@angular/platform-browser/testing/src/matchers';
|
@@ -911,17 +905,4 @@ describe('TestBed', () => {
|
911 | 905 | .toEqual(originalResolver);
|
912 | 906 | });
|
913 | 907 | });
|
914 |
| - |
915 |
| - onlyInIvy('Ivy module registration happens when NgModuleFactory is created') |
916 |
| - .it('cleans up registered modules', async() => { |
917 |
| - @NgModule({id: 'my_module'}) |
918 |
| - class MyModule { |
919 |
| - } |
920 |
| - |
921 |
| - expect(() => getModuleFactory('my_module')).toThrowError(); |
922 |
| - await TestBed.inject(Compiler).compileModuleAsync(MyModule); |
923 |
| - expect(() => getModuleFactory('my_module')).not.toThrowError(); |
924 |
| - TestBed.resetTestingModule(); |
925 |
| - expect(() => getModuleFactory('my_module')).toThrowError(); |
926 |
| - }); |
927 | 908 | });
|
0 commit comments