UNPKG

2.51 kBJavaScriptView Raw
1/**
2 * @license Angular v17.3.7
3 * (c) 2010-2024 Google LLC. https://angular.io/
4 * License: MIT
5 */
6
7import { PlatformLocation } from '@angular/common';
8import { MockPlatformLocation } from '@angular/common/testing';
9import * as i0 from '@angular/core';
10import { PLATFORM_INITIALIZER, createPlatformFactory, platformCore, APP_ID, provideZoneChangeDetection, NgModule } from '@angular/core';
11import { ɵBrowserDomAdapter, BrowserModule } from '@angular/platform-browser';
12
13function initBrowserTests() {
14 ɵBrowserDomAdapter.makeCurrent();
15}
16const _TEST_BROWSER_PLATFORM_PROVIDERS = [{ provide: PLATFORM_INITIALIZER, useValue: initBrowserTests, multi: true }];
17/**
18 * Platform for testing
19 *
20 * @publicApi
21 */
22const platformBrowserTesting = createPlatformFactory(platformCore, 'browserTesting', _TEST_BROWSER_PLATFORM_PROVIDERS);
23/**
24 * NgModule for testing.
25 *
26 * @publicApi
27 */
28class BrowserTestingModule {
29 static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: BrowserTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
30 static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.7", ngImport: i0, type: BrowserTestingModule, exports: [BrowserModule] }); }
31 static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: BrowserTestingModule, providers: [
32 { provide: APP_ID, useValue: 'a' },
33 provideZoneChangeDetection(),
34 { provide: PlatformLocation, useClass: MockPlatformLocation },
35 ], imports: [BrowserModule] }); }
36}
37i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: BrowserTestingModule, decorators: [{
38 type: NgModule,
39 args: [{
40 exports: [BrowserModule],
41 providers: [
42 { provide: APP_ID, useValue: 'a' },
43 provideZoneChangeDetection(),
44 { provide: PlatformLocation, useClass: MockPlatformLocation },
45 ]
46 }]
47 }] });
48
49/**
50 * @module
51 * @description
52 * Entry point for all public APIs of the platform-browser/testing package.
53 */
54
55/// <reference types="jasmine" />
56
57// This file is not used to build this module. It is only used during editing
58
59/**
60 * Generated bundle index. Do not edit.
61 */
62
63export { BrowserTestingModule, platformBrowserTesting };
64//# sourceMappingURL=testing.mjs.map