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
This commit is contained in:
Pete Bacon Darwin 2021-05-29 18:11:40 +01:00 committed by Dylan Hunn
parent 15fca6ca94
commit b037df28fd
2 changed files with 0 additions and 30 deletions

View File

@ -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');
});
}); });

View File

@ -35,18 +35,4 @@ describe('ServiceWorker navigation URLs', () => {
navigationUrls.forEach(url => expect(isNavigationUrl(url)).toBeTruthy(url)); navigationUrls.forEach(url => expect(isNavigationUrl(url)).toBeTruthy(url));
nonNavigationUrls.forEach(url => expect(isNavigationUrl(url)).toBeFalsy(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);
});
}); });