NET-Web-API-w-Angular/my-app/node_modules/@angular/platform-browser-dynamic/fesm2022/testing.mjs.map

1 line
6.4 KiB
Text
Raw Normal View History

2024-02-09 00:38:41 +00:00
{"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: