Closed tspmelo closed 1 year ago
+1 for this
I'm not sure what's the issue. We're using ng-packager to build it. Try to ask in the angular cli repo, please.
I can also confirm this behaviour, unit tests are failing becuase if accesing SVG_ICONS_CONFIG
before initialization:
ReferenceError: Cannot access 'SVG_ICONS_CONFIG' before initialization
@tspmelo 's seems to fix the problem (thanks for that).
I'm submitting a...
Current behavior
The app works fine and svg icons are displayed when I serve it or build it, but when I try to run unit tests of components that use svg-icon it always fails
Expected behavior
Tests should work as before.
Minimal reproduction of the problem with instructions
You can check an example here: https://github.com/tspmelo/ngneat-svg-icon-issue/pull/1
I noticed that unit tests are using
fesm2015/ngneat-svg-icon.mjs
and if I move the code from line 83 to line 65, tests start working again:Environment