testing.mjs 2.5 KB

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