angular-cn/aio/tests/deployment/unit
George Kalpakas 3b7d4ebbd6 fix(docs-infra): do not redirect disambiguated URLs (#41842)
In #41788, logic was added to disambiguate case-insensitively equal docs
paths/URLs. This process includes appending a `-\d+` suffix to some
paths/URLs (for example, `/.../inject-1`). Unfortunately, some of the
Firebase redirects configured in `firebase.json` would match these URLs
and redirect them to non-existing paths.
Example failures: [stable][1], [next][2]

NOTE:
This was not picked up in the regular CI tests run for PRs, because the
local devserver and the preview server used to test PRs do not support
Firebase-like redirects.

This commit fixes this by ensuring these disambiguated paths/URLs are
not matched by the redirect rules by checking whether the part of the
suffix after the `-` contains any numeric digits. While this check is
not ideal, it should be good enough for our purpose, since the legacy
URLs that we do want to redirect contain suffixes such as `-class`,
`-function` and thus no numeric digits.

[1]: https://circleci.com/gh/angular/angular/974345
[2]: https://circleci.com/gh/angular/angular/974346

PR Close #41842
2021-04-27 14:05:23 -07:00
..
test.js build(docs-infra): ensure that jasmine node tests fail on build error (#41596) 2021-04-13 11:54:15 -07:00
testFirebaseRedirection.spec.ts fix(docs-infra): do not redirect disambiguated URLs (#41842) 2021-04-27 14:05:23 -07:00
testServiceWorkerRoutes.spec.ts fix(docs-infra): do not redirect disambiguated URLs (#41842) 2021-04-27 14:05:23 -07:00
tsconfig.json build(docs-infra): clean up and update dependencies to match latest CLI (#32980) 2019-10-10 13:56:14 -07:00