testing.mjs 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. /**
  2. * @license Angular v19.2.4
  3. * (c) 2010-2025 Google LLC. https://angular.io/
  4. * License: MIT
  5. */
  6. import { ɵPlatformNavigation as _PlatformNavigation, DOCUMENT, PlatformLocation, ɵnormalizeQueryParams as _normalizeQueryParams, LocationStrategy, Location } from '@angular/common';
  7. import * as i0 from '@angular/core';
  8. import { InjectionToken, inject, Inject, Optional, Injectable } from '@angular/core';
  9. import { Subject } from 'rxjs';
  10. import { ɵFakeNavigation as _FakeNavigation } from '@angular/core/testing';
  11. export { ɵFakeNavigation } from '@angular/core/testing';
  12. /**
  13. * Parser from https://tools.ietf.org/html/rfc3986#appendix-B
  14. * ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?
  15. * 12 3 4 5 6 7 8 9
  16. *
  17. * Example: http://www.ics.uci.edu/pub/ietf/uri/#Related
  18. *
  19. * Results in:
  20. *
  21. * $1 = http:
  22. * $2 = http
  23. * $3 = //www.ics.uci.edu
  24. * $4 = www.ics.uci.edu
  25. * $5 = /pub/ietf/uri/
  26. * $6 = <undefined>
  27. * $7 = <undefined>
  28. * $8 = #Related
  29. * $9 = Related
  30. */
  31. const urlParse = /^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
  32. function parseUrl(urlStr, baseHref) {
  33. const verifyProtocol = /^((http[s]?|ftp):\/\/)/;
  34. let serverBase;
  35. // URL class requires full URL. If the URL string doesn't start with protocol, we need to add
  36. // an arbitrary base URL which can be removed afterward.
  37. if (!verifyProtocol.test(urlStr)) {
  38. serverBase = 'http://empty.com/';
  39. }
  40. let parsedUrl;
  41. try {
  42. parsedUrl = new URL(urlStr, serverBase);
  43. }
  44. catch (e) {
  45. const result = urlParse.exec(serverBase || '' + urlStr);
  46. if (!result) {
  47. throw new Error(`Invalid URL: ${urlStr} with base: ${baseHref}`);
  48. }
  49. const hostSplit = result[4].split(':');
  50. parsedUrl = {
  51. protocol: result[1],
  52. hostname: hostSplit[0],
  53. port: hostSplit[1] || '',
  54. pathname: result[5],
  55. search: result[6],
  56. hash: result[8],
  57. };
  58. }
  59. if (parsedUrl.pathname && parsedUrl.pathname.indexOf(baseHref) === 0) {
  60. parsedUrl.pathname = parsedUrl.pathname.substring(baseHref.length);
  61. }
  62. return {
  63. hostname: (!serverBase && parsedUrl.hostname) || '',
  64. protocol: (!serverBase && parsedUrl.protocol) || '',
  65. port: (!serverBase && parsedUrl.port) || '',
  66. pathname: parsedUrl.pathname || '/',
  67. search: parsedUrl.search || '',
  68. hash: parsedUrl.hash || '',
  69. };
  70. }
  71. /**
  72. * Provider for mock platform location config
  73. *
  74. * @publicApi
  75. */
  76. const MOCK_PLATFORM_LOCATION_CONFIG = new InjectionToken('MOCK_PLATFORM_LOCATION_CONFIG');
  77. /**
  78. * Mock implementation of URL state.
  79. *
  80. * @publicApi
  81. */
  82. class MockPlatformLocation {
  83. baseHref = '';
  84. hashUpdate = new Subject();
  85. popStateSubject = new Subject();
  86. urlChangeIndex = 0;
  87. urlChanges = [{ hostname: '', protocol: '', port: '', pathname: '/', search: '', hash: '', state: null }];
  88. constructor(config) {
  89. if (config) {
  90. this.baseHref = config.appBaseHref || '';
  91. const parsedChanges = this.parseChanges(null, config.startUrl || 'http://_empty_/', this.baseHref);
  92. this.urlChanges[0] = { ...parsedChanges };
  93. }
  94. }
  95. get hostname() {
  96. return this.urlChanges[this.urlChangeIndex].hostname;
  97. }
  98. get protocol() {
  99. return this.urlChanges[this.urlChangeIndex].protocol;
  100. }
  101. get port() {
  102. return this.urlChanges[this.urlChangeIndex].port;
  103. }
  104. get pathname() {
  105. return this.urlChanges[this.urlChangeIndex].pathname;
  106. }
  107. get search() {
  108. return this.urlChanges[this.urlChangeIndex].search;
  109. }
  110. get hash() {
  111. return this.urlChanges[this.urlChangeIndex].hash;
  112. }
  113. get state() {
  114. return this.urlChanges[this.urlChangeIndex].state;
  115. }
  116. getBaseHrefFromDOM() {
  117. return this.baseHref;
  118. }
  119. onPopState(fn) {
  120. const subscription = this.popStateSubject.subscribe(fn);
  121. return () => subscription.unsubscribe();
  122. }
  123. onHashChange(fn) {
  124. const subscription = this.hashUpdate.subscribe(fn);
  125. return () => subscription.unsubscribe();
  126. }
  127. get href() {
  128. let url = `${this.protocol}//${this.hostname}${this.port ? ':' + this.port : ''}`;
  129. url += `${this.pathname === '/' ? '' : this.pathname}${this.search}${this.hash}`;
  130. return url;
  131. }
  132. get url() {
  133. return `${this.pathname}${this.search}${this.hash}`;
  134. }
  135. parseChanges(state, url, baseHref = '') {
  136. // When the `history.state` value is stored, it is always copied.
  137. state = JSON.parse(JSON.stringify(state));
  138. return { ...parseUrl(url, baseHref), state };
  139. }
  140. replaceState(state, title, newUrl) {
  141. const { pathname, search, state: parsedState, hash } = this.parseChanges(state, newUrl);
  142. this.urlChanges[this.urlChangeIndex] = {
  143. ...this.urlChanges[this.urlChangeIndex],
  144. pathname,
  145. search,
  146. hash,
  147. state: parsedState,
  148. };
  149. }
  150. pushState(state, title, newUrl) {
  151. const { pathname, search, state: parsedState, hash } = this.parseChanges(state, newUrl);
  152. if (this.urlChangeIndex > 0) {
  153. this.urlChanges.splice(this.urlChangeIndex + 1);
  154. }
  155. this.urlChanges.push({
  156. ...this.urlChanges[this.urlChangeIndex],
  157. pathname,
  158. search,
  159. hash,
  160. state: parsedState,
  161. });
  162. this.urlChangeIndex = this.urlChanges.length - 1;
  163. }
  164. forward() {
  165. const oldUrl = this.url;
  166. const oldHash = this.hash;
  167. if (this.urlChangeIndex < this.urlChanges.length) {
  168. this.urlChangeIndex++;
  169. }
  170. this.emitEvents(oldHash, oldUrl);
  171. }
  172. back() {
  173. const oldUrl = this.url;
  174. const oldHash = this.hash;
  175. if (this.urlChangeIndex > 0) {
  176. this.urlChangeIndex--;
  177. }
  178. this.emitEvents(oldHash, oldUrl);
  179. }
  180. historyGo(relativePosition = 0) {
  181. const oldUrl = this.url;
  182. const oldHash = this.hash;
  183. const nextPageIndex = this.urlChangeIndex + relativePosition;
  184. if (nextPageIndex >= 0 && nextPageIndex < this.urlChanges.length) {
  185. this.urlChangeIndex = nextPageIndex;
  186. }
  187. this.emitEvents(oldHash, oldUrl);
  188. }
  189. getState() {
  190. return this.state;
  191. }
  192. /**
  193. * Browsers are inconsistent in when they fire events and perform the state updates
  194. * The most easiest thing to do in our mock is synchronous and that happens to match
  195. * Firefox and Chrome, at least somewhat closely
  196. *
  197. * https://github.com/WICG/navigation-api#watching-for-navigations
  198. * https://docs.google.com/document/d/1Pdve-DJ1JCGilj9Yqf5HxRJyBKSel5owgOvUJqTauwU/edit#heading=h.3ye4v71wsz94
  199. * popstate is always sent before hashchange:
  200. * https://developer.mozilla.org/en-US/docs/Web/API/Window/popstate_event#when_popstate_is_sent
  201. */
  202. emitEvents(oldHash, oldUrl) {
  203. this.popStateSubject.next({
  204. type: 'popstate',
  205. state: this.getState(),
  206. oldUrl,
  207. newUrl: this.url,
  208. });
  209. if (oldHash !== this.hash) {
  210. this.hashUpdate.next({
  211. type: 'hashchange',
  212. state: null,
  213. oldUrl,
  214. newUrl: this.url,
  215. });
  216. }
  217. }
  218. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: MockPlatformLocation, deps: [{ token: MOCK_PLATFORM_LOCATION_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
  219. static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: MockPlatformLocation });
  220. }
  221. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: MockPlatformLocation, decorators: [{
  222. type: Injectable
  223. }], ctorParameters: () => [{ type: undefined, decorators: [{
  224. type: Inject,
  225. args: [MOCK_PLATFORM_LOCATION_CONFIG]
  226. }, {
  227. type: Optional
  228. }] }] });
  229. /**
  230. * Mock implementation of URL state.
  231. */
  232. class FakeNavigationPlatformLocation {
  233. _platformNavigation = inject(_PlatformNavigation);
  234. window = inject(DOCUMENT).defaultView;
  235. constructor() {
  236. if (!(this._platformNavigation instanceof _FakeNavigation)) {
  237. throw new Error('FakePlatformNavigation cannot be used without FakeNavigation. Use ' +
  238. '`provideFakeNavigation` to have all these services provided together.');
  239. }
  240. }
  241. config = inject(MOCK_PLATFORM_LOCATION_CONFIG, { optional: true });
  242. getBaseHrefFromDOM() {
  243. return this.config?.appBaseHref ?? '';
  244. }
  245. onPopState(fn) {
  246. this.window.addEventListener('popstate', fn);
  247. return () => this.window.removeEventListener('popstate', fn);
  248. }
  249. onHashChange(fn) {
  250. this.window.addEventListener('hashchange', fn);
  251. return () => this.window.removeEventListener('hashchange', fn);
  252. }
  253. get href() {
  254. return this._platformNavigation.currentEntry.url;
  255. }
  256. get protocol() {
  257. return new URL(this._platformNavigation.currentEntry.url).protocol;
  258. }
  259. get hostname() {
  260. return new URL(this._platformNavigation.currentEntry.url).hostname;
  261. }
  262. get port() {
  263. return new URL(this._platformNavigation.currentEntry.url).port;
  264. }
  265. get pathname() {
  266. return new URL(this._platformNavigation.currentEntry.url).pathname;
  267. }
  268. get search() {
  269. return new URL(this._platformNavigation.currentEntry.url).search;
  270. }
  271. get hash() {
  272. return new URL(this._platformNavigation.currentEntry.url).hash;
  273. }
  274. pushState(state, title, url) {
  275. this._platformNavigation.pushState(state, title, url);
  276. }
  277. replaceState(state, title, url) {
  278. this._platformNavigation.replaceState(state, title, url);
  279. }
  280. forward() {
  281. this._platformNavigation.forward();
  282. }
  283. back() {
  284. this._platformNavigation.back();
  285. }
  286. historyGo(relativePosition = 0) {
  287. this._platformNavigation.go(relativePosition);
  288. }
  289. getState() {
  290. return this._platformNavigation.currentEntry.getHistoryState();
  291. }
  292. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: FakeNavigationPlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
  293. static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: FakeNavigationPlatformLocation });
  294. }
  295. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: FakeNavigationPlatformLocation, decorators: [{
  296. type: Injectable
  297. }], ctorParameters: () => [] });
  298. /**
  299. * Return a provider for the `FakeNavigation` in place of the real Navigation API.
  300. */
  301. function provideFakePlatformNavigation() {
  302. return [
  303. {
  304. provide: _PlatformNavigation,
  305. useFactory: () => {
  306. const config = inject(MOCK_PLATFORM_LOCATION_CONFIG, { optional: true });
  307. return new _FakeNavigation(inject(DOCUMENT).defaultView, config?.startUrl ?? 'http://_empty_/');
  308. },
  309. },
  310. { provide: PlatformLocation, useClass: FakeNavigationPlatformLocation },
  311. ];
  312. }
  313. /**
  314. * A spy for {@link Location} that allows tests to fire simulated location events.
  315. *
  316. * @publicApi
  317. */
  318. class SpyLocation {
  319. urlChanges = [];
  320. _history = [new LocationState('', '', null)];
  321. _historyIndex = 0;
  322. /** @internal */
  323. _subject = new Subject();
  324. /** @internal */
  325. _basePath = '';
  326. /** @internal */
  327. _locationStrategy = null;
  328. /** @internal */
  329. _urlChangeListeners = [];
  330. /** @internal */
  331. _urlChangeSubscription = null;
  332. /** @nodoc */
  333. ngOnDestroy() {
  334. this._urlChangeSubscription?.unsubscribe();
  335. this._urlChangeListeners = [];
  336. }
  337. setInitialPath(url) {
  338. this._history[this._historyIndex].path = url;
  339. }
  340. setBaseHref(url) {
  341. this._basePath = url;
  342. }
  343. path() {
  344. return this._history[this._historyIndex].path;
  345. }
  346. getState() {
  347. return this._history[this._historyIndex].state;
  348. }
  349. isCurrentPathEqualTo(path, query = '') {
  350. const givenPath = path.endsWith('/') ? path.substring(0, path.length - 1) : path;
  351. const currPath = this.path().endsWith('/')
  352. ? this.path().substring(0, this.path().length - 1)
  353. : this.path();
  354. return currPath == givenPath + (query.length > 0 ? '?' + query : '');
  355. }
  356. simulateUrlPop(pathname) {
  357. this._subject.next({ 'url': pathname, 'pop': true, 'type': 'popstate' });
  358. }
  359. simulateHashChange(pathname) {
  360. const path = this.prepareExternalUrl(pathname);
  361. this.pushHistory(path, '', null);
  362. this.urlChanges.push('hash: ' + pathname);
  363. // the browser will automatically fire popstate event before each `hashchange` event, so we need
  364. // to simulate it.
  365. this._subject.next({ 'url': pathname, 'pop': true, 'type': 'popstate' });
  366. this._subject.next({ 'url': pathname, 'pop': true, 'type': 'hashchange' });
  367. }
  368. prepareExternalUrl(url) {
  369. if (url.length > 0 && !url.startsWith('/')) {
  370. url = '/' + url;
  371. }
  372. return this._basePath + url;
  373. }
  374. go(path, query = '', state = null) {
  375. path = this.prepareExternalUrl(path);
  376. this.pushHistory(path, query, state);
  377. const locationState = this._history[this._historyIndex - 1];
  378. if (locationState.path == path && locationState.query == query) {
  379. return;
  380. }
  381. const url = path + (query.length > 0 ? '?' + query : '');
  382. this.urlChanges.push(url);
  383. this._notifyUrlChangeListeners(path + _normalizeQueryParams(query), state);
  384. }
  385. replaceState(path, query = '', state = null) {
  386. path = this.prepareExternalUrl(path);
  387. const history = this._history[this._historyIndex];
  388. history.state = state;
  389. if (history.path == path && history.query == query) {
  390. return;
  391. }
  392. history.path = path;
  393. history.query = query;
  394. const url = path + (query.length > 0 ? '?' + query : '');
  395. this.urlChanges.push('replace: ' + url);
  396. this._notifyUrlChangeListeners(path + _normalizeQueryParams(query), state);
  397. }
  398. forward() {
  399. if (this._historyIndex < this._history.length - 1) {
  400. this._historyIndex++;
  401. this._subject.next({
  402. 'url': this.path(),
  403. 'state': this.getState(),
  404. 'pop': true,
  405. 'type': 'popstate',
  406. });
  407. }
  408. }
  409. back() {
  410. if (this._historyIndex > 0) {
  411. this._historyIndex--;
  412. this._subject.next({
  413. 'url': this.path(),
  414. 'state': this.getState(),
  415. 'pop': true,
  416. 'type': 'popstate',
  417. });
  418. }
  419. }
  420. historyGo(relativePosition = 0) {
  421. const nextPageIndex = this._historyIndex + relativePosition;
  422. if (nextPageIndex >= 0 && nextPageIndex < this._history.length) {
  423. this._historyIndex = nextPageIndex;
  424. this._subject.next({
  425. 'url': this.path(),
  426. 'state': this.getState(),
  427. 'pop': true,
  428. 'type': 'popstate',
  429. });
  430. }
  431. }
  432. onUrlChange(fn) {
  433. this._urlChangeListeners.push(fn);
  434. this._urlChangeSubscription ??= this.subscribe((v) => {
  435. this._notifyUrlChangeListeners(v.url, v.state);
  436. });
  437. return () => {
  438. const fnIndex = this._urlChangeListeners.indexOf(fn);
  439. this._urlChangeListeners.splice(fnIndex, 1);
  440. if (this._urlChangeListeners.length === 0) {
  441. this._urlChangeSubscription?.unsubscribe();
  442. this._urlChangeSubscription = null;
  443. }
  444. };
  445. }
  446. /** @internal */
  447. _notifyUrlChangeListeners(url = '', state) {
  448. this._urlChangeListeners.forEach((fn) => fn(url, state));
  449. }
  450. subscribe(onNext, onThrow, onReturn) {
  451. return this._subject.subscribe({
  452. next: onNext,
  453. error: onThrow ?? undefined,
  454. complete: onReturn ?? undefined,
  455. });
  456. }
  457. normalize(url) {
  458. return null;
  459. }
  460. pushHistory(path, query, state) {
  461. if (this._historyIndex > 0) {
  462. this._history.splice(this._historyIndex + 1);
  463. }
  464. this._history.push(new LocationState(path, query, state));
  465. this._historyIndex = this._history.length - 1;
  466. }
  467. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: SpyLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
  468. static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: SpyLocation });
  469. }
  470. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: SpyLocation, decorators: [{
  471. type: Injectable
  472. }] });
  473. class LocationState {
  474. path;
  475. query;
  476. state;
  477. constructor(path, query, state) {
  478. this.path = path;
  479. this.query = query;
  480. this.state = state;
  481. }
  482. }
  483. /**
  484. * A mock implementation of {@link LocationStrategy} that allows tests to fire simulated
  485. * location events.
  486. *
  487. * @publicApi
  488. */
  489. class MockLocationStrategy extends LocationStrategy {
  490. internalBaseHref = '/';
  491. internalPath = '/';
  492. internalTitle = '';
  493. urlChanges = [];
  494. /** @internal */
  495. _subject = new Subject();
  496. stateChanges = [];
  497. constructor() {
  498. super();
  499. }
  500. simulatePopState(url) {
  501. this.internalPath = url;
  502. this._subject.next(new _MockPopStateEvent(this.path()));
  503. }
  504. path(includeHash = false) {
  505. return this.internalPath;
  506. }
  507. prepareExternalUrl(internal) {
  508. if (internal.startsWith('/') && this.internalBaseHref.endsWith('/')) {
  509. return this.internalBaseHref + internal.substring(1);
  510. }
  511. return this.internalBaseHref + internal;
  512. }
  513. pushState(ctx, title, path, query) {
  514. // Add state change to changes array
  515. this.stateChanges.push(ctx);
  516. this.internalTitle = title;
  517. const url = path + (query.length > 0 ? '?' + query : '');
  518. this.internalPath = url;
  519. const externalUrl = this.prepareExternalUrl(url);
  520. this.urlChanges.push(externalUrl);
  521. }
  522. replaceState(ctx, title, path, query) {
  523. // Reset the last index of stateChanges to the ctx (state) object
  524. this.stateChanges[(this.stateChanges.length || 1) - 1] = ctx;
  525. this.internalTitle = title;
  526. const url = path + (query.length > 0 ? '?' + query : '');
  527. this.internalPath = url;
  528. const externalUrl = this.prepareExternalUrl(url);
  529. this.urlChanges.push('replace: ' + externalUrl);
  530. }
  531. onPopState(fn) {
  532. this._subject.subscribe({ next: fn });
  533. }
  534. getBaseHref() {
  535. return this.internalBaseHref;
  536. }
  537. back() {
  538. if (this.urlChanges.length > 0) {
  539. this.urlChanges.pop();
  540. this.stateChanges.pop();
  541. const nextUrl = this.urlChanges.length > 0 ? this.urlChanges[this.urlChanges.length - 1] : '';
  542. this.simulatePopState(nextUrl);
  543. }
  544. }
  545. forward() {
  546. throw 'not implemented';
  547. }
  548. getState() {
  549. return this.stateChanges[(this.stateChanges.length || 1) - 1];
  550. }
  551. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: MockLocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
  552. static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: MockLocationStrategy });
  553. }
  554. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: MockLocationStrategy, decorators: [{
  555. type: Injectable
  556. }], ctorParameters: () => [] });
  557. class _MockPopStateEvent {
  558. newUrl;
  559. pop = true;
  560. type = 'popstate';
  561. constructor(newUrl) {
  562. this.newUrl = newUrl;
  563. }
  564. }
  565. /**
  566. * Returns mock providers for the `Location` and `LocationStrategy` classes.
  567. * The mocks are helpful in tests to fire simulated location events.
  568. *
  569. * @publicApi
  570. */
  571. function provideLocationMocks() {
  572. return [
  573. { provide: Location, useClass: SpyLocation },
  574. { provide: LocationStrategy, useClass: MockLocationStrategy },
  575. ];
  576. }
  577. export { MOCK_PLATFORM_LOCATION_CONFIG, MockLocationStrategy, MockPlatformLocation, SpyLocation, provideLocationMocks, provideFakePlatformNavigation as ɵprovideFakePlatformNavigation };
  578. //# sourceMappingURL=testing.mjs.map