source: trip-planner-front/node_modules/@angular/platform-browser-dynamic/fesm2015/testing.js.map@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 15.8 KB
Line 
1{"version":3,"file":"testing.js","sources":["../../../../../../packages/platform-browser-dynamic/testing/src/dom_test_component_renderer.ts","../../../../../../packages/platform-browser-dynamic/testing/src/metadata_overrider.ts","../../../../../../packages/platform-browser-dynamic/testing/src/compiler_factory.ts","../../../../../../packages/platform-browser-dynamic/testing/src/platform_core_dynamic_testing.ts","../../../../../../packages/platform-browser-dynamic/testing/src/private_export_testing.ts","../../../../../../packages/platform-browser-dynamic/testing/src/testing.ts","../../../../../../packages/platform-browser-dynamic/testing/public_api.ts","../../../../../../packages/platform-browser-dynamic/testing/index.ts","../../../../../../packages/platform-browser-dynamic/testing/testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT, ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\nimport {TestComponentRenderer} from '@angular/core/testing';\n\n/**\n * A DOM based implementation of the TestComponentRenderer.\n */\n@Injectable()\nexport class DOMTestComponentRenderer extends TestComponentRenderer {\n constructor(@Inject(DOCUMENT) private _doc: any) {\n super();\n }\n\n override insertRootElement(rootElId: string) {\n this.removeAllRootElements();\n const rootElement = getDOM().getDefaultDocument().createElement('div');\n rootElement.setAttribute('id', rootElId);\n this._doc.body.appendChild(rootElement);\n }\n\n override removeAllRootElements() {\n // TODO(juliemr): can/should this be optional?\n const oldRoots = this._doc.querySelectorAll('[id^=root]');\n for (let i = 0; i < oldRoots.length; i++) {\n getDOM().remove(oldRoots[i]);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// `MetadataOverrider` has been moved to core/testing to allow using it from the render3 TestBed\nexport {ɵMetadataOverrider as MetadataOverrider} from '@angular/core/testing';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CompileReflector, DirectiveResolver, ERROR_COMPONENT_TYPE, NgModuleResolver, PipeResolver} from '@angular/compiler';\nimport {MockDirectiveResolver, MockNgModuleResolver, MockPipeResolver} from '@angular/compiler/testing';\nimport {CompilerFactory, CompilerOptions, Component, ComponentFactory, Directive, Injector, ModuleWithComponentFactories, NgModule, NgModuleFactory, Pipe, StaticProvider, Type, ɵstringify as stringify} from '@angular/core';\nimport {MetadataOverride, ɵTestingCompiler as TestingCompiler, ɵTestingCompilerFactory as TestingCompilerFactory} from '@angular/core/testing';\nimport {ɵCompilerImpl as CompilerImpl} from '@angular/platform-browser-dynamic';\n\nimport {MetadataOverrider} from './metadata_overrider';\n\nexport const COMPILER_PROVIDERS: StaticProvider[] = [\n {provide: MockPipeResolver, deps: [CompileReflector]},\n {provide: PipeResolver, useExisting: MockPipeResolver},\n {provide: MockDirectiveResolver, deps: [CompileReflector]},\n {provide: DirectiveResolver, useExisting: MockDirectiveResolver},\n {provide: MockNgModuleResolver, deps: [CompileReflector]},\n {provide: NgModuleResolver, useExisting: MockNgModuleResolver},\n];\n\nexport class TestingCompilerFactoryImpl implements TestingCompilerFactory {\n constructor(private _injector: Injector, private _compilerFactory: CompilerFactory) {}\n\n createTestingCompiler(options: CompilerOptions[]): TestingCompiler {\n const compiler = <CompilerImpl>this._compilerFactory.createCompiler(options);\n return new TestingCompilerImpl(\n compiler, compiler.injector.get(MockDirectiveResolver),\n compiler.injector.get(MockPipeResolver), compiler.injector.get(MockNgModuleResolver));\n }\n}\n\nexport class TestingCompilerImpl implements TestingCompiler {\n private _overrider = new MetadataOverrider();\n constructor(\n private _compiler: CompilerImpl, private _directiveResolver: MockDirectiveResolver,\n private _pipeResolver: MockPipeResolver, private _moduleResolver: MockNgModuleResolver) {}\n get injector(): Injector {\n return this._compiler.injector;\n }\n\n compileModuleSync<T>(moduleType: Type<T>): NgModuleFactory<T> {\n return this._compiler.compileModuleSync(moduleType);\n }\n\n compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>> {\n return this._compiler.compileModuleAsync(moduleType);\n }\n compileModuleAndAllComponentsSync<T>(moduleType: Type<T>): ModuleWithComponentFactories<T> {\n return this._compiler.compileModuleAndAllComponentsSync(moduleType);\n }\n\n compileModuleAndAllComponentsAsync<T>(moduleType: Type<T>):\n Promise<ModuleWithComponentFactories<T>> {\n return this._compiler.compileModuleAndAllComponentsAsync(moduleType);\n }\n\n getComponentFactory<T>(component: Type<T>): ComponentFactory<T> {\n return this._compiler.getComponentFactory(component);\n }\n\n checkOverrideAllowed(type: Type<any>) {\n if (this._compiler.hasAotSummary(type)) {\n throw new Error(`${stringify(type)} was AOT compiled, so its metadata cannot be changed.`);\n }\n }\n\n overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): void {\n this.checkOverrideAllowed(ngModule);\n const oldMetadata = this._moduleResolver.resolve(ngModule, false);\n this._moduleResolver.setNgModule(\n ngModule, this._overrider.overrideMetadata(NgModule, oldMetadata, override));\n this.clearCacheFor(ngModule);\n }\n overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): void {\n this.checkOverrideAllowed(directive);\n const oldMetadata = this._directiveResolver.resolve(directive, false);\n this._directiveResolver.setDirective(\n directive, this._overrider.overrideMetadata(Directive, oldMetadata!, override));\n this.clearCacheFor(directive);\n }\n overrideComponent(component: Type<any>, override: MetadataOverride<Component>): void {\n this.checkOverrideAllowed(component);\n const oldMetadata = this._directiveResolver.resolve(component, false);\n this._directiveResolver.setDirective(\n component, this._overrider.overrideMetadata(Component, oldMetadata!, override));\n this.clearCacheFor(component);\n }\n overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): void {\n this.checkOverrideAllowed(pipe);\n const oldMetadata = this._pipeResolver.resolve(pipe, false);\n this._pipeResolver.setPipe(pipe, this._overrider.overrideMetadata(Pipe, oldMetadata, override));\n this.clearCacheFor(pipe);\n }\n loadAotSummaries(summaries: () => any[]) {\n this._compiler.loadAotSummaries(summaries);\n }\n clearCache(): void {\n this._compiler.clearCache();\n }\n clearCacheFor(type: Type<any>) {\n this._compiler.clearCacheFor(type);\n }\n\n getComponentFromError(error: Error) {\n return (error as any)[ERROR_COMPONENT_TYPE] || null;\n }\n\n getModuleId(moduleType: Type<any>): string|undefined {\n return this._moduleResolver.resolve(moduleType, true).id;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {COMPILER_OPTIONS, CompilerFactory, createPlatformFactory, Injector, PlatformRef} from '@angular/core';\nimport {ɵTestingCompilerFactory as TestingCompilerFactory} from '@angular/core/testing';\nimport {ɵplatformCoreDynamic as platformCoreDynamic} from '@angular/platform-browser-dynamic';\n\nimport {COMPILER_PROVIDERS, TestingCompilerFactoryImpl} from './compiler_factory';\n\n/**\n * Platform for dynamic tests\n *\n * @publicApi\n */\nexport const platformCoreDynamicTesting: (extraProviders?: any[]) => PlatformRef =\n createPlatformFactory(platformCoreDynamic, 'coreDynamicTesting', [\n {provide: COMPILER_OPTIONS, useValue: {providers: COMPILER_PROVIDERS}, multi: true}, {\n provide: TestingCompilerFactory,\n useClass: TestingCompilerFactoryImpl,\n deps: [Injector, CompilerFactory]\n }\n ]);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {DOMTestComponentRenderer as ɵDOMTestComponentRenderer} from './dom_test_component_renderer';\nexport {platformCoreDynamicTesting as ɵplatformCoreDynamicTesting} from './platform_core_dynamic_testing';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {createPlatformFactory, NgModule, PlatformRef, StaticProvider} from '@angular/core';\nimport {TestComponentRenderer} from '@angular/core/testing';\nimport {ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS as INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS} from '@angular/platform-browser-dynamic';\nimport {BrowserTestingModule} from '@angular/platform-browser/testing';\n\nimport {DOMTestComponentRenderer} from './dom_test_component_renderer';\nimport {platformCoreDynamicTesting} from './platform_core_dynamic_testing';\n\nexport * from './private_export_testing';\n\n/**\n * @publicApi\n */\nexport const platformBrowserDynamicTesting = createPlatformFactory(\n platformCoreDynamicTesting, 'browserDynamicTesting',\n INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS);\n\n/**\n * NgModule for testing.\n *\n * @publicApi\n */\n@NgModule({\n exports: [BrowserTestingModule],\n providers: [\n {provide: TestComponentRenderer, useClass: DOMTestComponentRenderer},\n ]\n})\nexport class BrowserDynamicTestingModule {\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/testing';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {COMPILER_PROVIDERS as ɵangular_packages_platform_browser_dynamic_testing_testing_a,TestingCompilerFactoryImpl as ɵangular_packages_platform_browser_dynamic_testing_testing_b} from './src/compiler_factory';"],"names":["getDOM","MetadataOverrider","stringify","platformCoreDynamic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