relative baseUrl path for unit tests
Hi,
this is not a blocker but I would like to point to a different (relative) URL for Angular unit tests, so we don't see 404's in the spec output:
04 05 2020 13:33:42.878:WARN [web-server]: 404: /assets/icons/search.svg
I tried the following baseUrl:
InlineSVGModule.forRoot({
baseUrl: '../../libs'
})
but the ../../ part seems to be removed:
04 05 2020 13:33:42.878:WARN [web-server]: 404: /libs/assets/icons/search.svg
This does not seem to explicitly happen in getAbsoluteUrl():
https://github.com/arkon/ng-inline-svg/blob/5b675dce50b62e3dbd9d73cf38826c7fb81de7e0/src/svg-cache.service.ts#L83
When I put a console log there to see what url and _baseUrl are, I do see:
'/assets/icons/search.svg' and '../../libs' consecutively.
So I know that the config override is applied, at least.
I imagine it's getting lost here: https://github.com/arkon/ng-inline-svg/blob/5b675dce50b62e3dbd9d73cf38826c7fb81de7e0/src/svg-cache.service.ts#L95-L98
Does that relative path actually resolve to a valid URL? (i.e. what's the absolute form of it?)
Yes, this was my finding as well! Not sure why I forgot to add this to the original issue.
I am picking this up again. I'm trying to debug my unit tests while including a breakpoint in said service on mentioned line, but having a bit of trouble getting the breakpoint to work.