You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #151, a change was made that adds the current origin to the baseUrl. Although this works fine in most cases, or as the PR says "unlikely to be an issue in practice", it does affect our tests. Let me briefly explain this first.
Our acceptance tests work with PollyJS, which stores the API responses in recording files. To make those requests in the recordings API-agnostic (to allow recording tests with different backends), we set up our API host as '' and use a proxy server to intercept those requests and do the requests to the backend that is currently configured. The way the tests then look up the requests in those recording files, is based on the url, headers, etc. Since this addon turns a url like /v1/users into for example http://localhost:4200/v1/users, this lookup fails. Re-recording the tests is not a solution though, as CI uses a different host and then the lookup would fail there.
I think that the location.href addition was done because new URL(baseUrl) fails with a baseUrl of e.g. /v1/users. However, since this is indeed a breaking change (for us at least), I think it's safer to do something like
In #151, a change was made that adds the current origin to the
baseUrl
. Although this works fine in most cases, or as the PR says "unlikely to be an issue in practice", it does affect our tests. Let me briefly explain this first.Our acceptance tests work with PollyJS, which stores the API responses in recording files. To make those requests in the recordings API-agnostic (to allow recording tests with different backends), we set up our API host as
''
and use a proxy server to intercept those requests and do the requests to the backend that is currently configured. The way the tests then look up the requests in those recording files, is based on the url, headers, etc. Since this addon turns a url like/v1/users
into for examplehttp://localhost:4200/v1/users
, this lookup fails. Re-recording the tests is not a solution though, as CI uses a different host and then the lookup would fail there.I think that the
location.href
addition was done becausenew URL(baseUrl)
fails with a baseUrl of e.g./v1/users
. However, since this is indeed a breaking change (for us at least), I think it's safer to do something likeThe text was updated successfully, but these errors were encountered: