1 line
No EOL
6.4 KiB
Text
Executable file
1 line
No EOL
6.4 KiB
Text
Executable file
{"version":3,"file":"testing.mjs","sources":["../../../../../../packages/platform-browser-dynamic/testing/src/dom_test_component_renderer.ts","../../../../../../packages/platform-browser-dynamic/testing/src/platform_core_dynamic_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\nimport {createPlatformFactory, PlatformRef} from '@angular/core';\nimport {ɵplatformCoreDynamic as platformCoreDynamic} from '@angular/platform-browser-dynamic';\n\n/**\n * Platform for dynamic tests\n *\n * @publicApi\n */\nexport const platformCoreDynamicTesting: (extraProviders?: any[]) => PlatformRef =\n createPlatformFactory(\n platformCoreDynamic,\n 'coreDynamicTesting',\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 {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"],"names":["getDOM","platformCoreDynamic","INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS"],"mappings":";;;;;;;;;;;;;AAYA;;A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