angular-docs-cn/packages/router/test/aot_ngsummary_test/aot_router_bootstrap.spec.ts
Matt Keller 00d3666d95 fix(compiler): Fix look up of entryComponents in AOT Summaries (#24892)
Previously, when you attempted to bootstrap a component that had a
router-outlet using ngsummaries, it would complain that the component
was not provided by any module even if it was. This commit fixes a
mistake (AFAICT) which caused the lookup of the component in the AOT
summaries to fail.

I believe this change is safe. I've run the affected tests within Google
and there were no breakages caused by this change.

PR Close #24892
2018-09-11 16:23:17 -07:00

29 lines
836 B
TypeScript

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {TestBed} from '@angular/core/testing';
import {RouterTestingModule} from '../../testing';
import {AotRouterModule, ROUTES} from './aot_router_module';
import {AotRouterModuleNgSummary} from './aot_router_module.ngsummary';
describe('The Aot Routing Component', () => {
it('should be able to compile the components while using aotSummaries', () => {
TestBed
.configureTestingModule({
imports: [
AotRouterModule,
RouterTestingModule.withRoutes(ROUTES),
],
aotSummaries: () => [AotRouterModuleNgSummary],
})
.compileComponents();
});
});