From b037df28fdaf2daac750e635d2157447381018f1 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Sat, 29 May 2021 18:11:40 +0100 Subject: [PATCH] Revert "fix(docs-infra): do not redirect disambiguated URLs" (#42414) This reverts commit 61ad68a586135a4d7b2b920fda0cb4238c6422fe, since there are no longer any disambiguated paths that need special handling. PR Close #42414 --- .../unit/testFirebaseRedirection.spec.ts | 16 ---------------- .../unit/testServiceWorkerRoutes.spec.ts | 14 -------------- 2 files changed, 30 deletions(-) diff --git a/aio/tests/deployment/unit/testFirebaseRedirection.spec.ts b/aio/tests/deployment/unit/testFirebaseRedirection.spec.ts index 7623227ae7..9ac74675f2 100644 --- a/aio/tests/deployment/unit/testFirebaseRedirection.spec.ts +++ b/aio/tests/deployment/unit/testFirebaseRedirection.spec.ts @@ -33,20 +33,4 @@ describe('firebase.json redirect config', () => { }); }); }); - - it('should not redirect disambiguated URLs', () => { - const redirector = getRedirector(); - - // Disambiguated URL. - const url1 = '/api/core/Foo-0'; - expect(redirector.redirect(url1)).toBe(url1); - - // Disambiguated URL. - const url2 = '/api/core/BAR-1337'; - expect(redirector.redirect(url2)).toBe(url2); - - // Non-disambiguated URL with dash. - const url3 = '/api/core/baz-class'; - expect(redirector.redirect(url3)).toBe('/api/core/baz'); - }); }); diff --git a/aio/tests/deployment/unit/testServiceWorkerRoutes.spec.ts b/aio/tests/deployment/unit/testServiceWorkerRoutes.spec.ts index 41fc8429ee..98d37fb007 100644 --- a/aio/tests/deployment/unit/testServiceWorkerRoutes.spec.ts +++ b/aio/tests/deployment/unit/testServiceWorkerRoutes.spec.ts @@ -35,18 +35,4 @@ describe('ServiceWorker navigation URLs', () => { navigationUrls.forEach(url => expect(isNavigationUrl(url)).toBeTruthy(url)); nonNavigationUrls.forEach(url => expect(isNavigationUrl(url)).toBeFalsy(url)); }); - - it('should treat disambiguated URLs as navigation URLs', () => { - // Disambiguated URL. - const url1 = '/api/core/Foo-0'; - expect(isNavigationUrl(url1)).toBeTruthy(url1); - - // Disambiguated URL. - const url2 = '/api/core/BAR-1337'; - expect(isNavigationUrl(url2)).toBeTruthy(url2); - - // Non-disambiguated URL with dash. - const url3 = '/api/core/baz-class'; - expect(isNavigationUrl(url3)).toBeFalsy(url3); - }); });