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
This works fine for our application and it seems that everything works as expected. We face some issues in our tests though.
`Error: Uncaught (in promise): Highlight.js library was not imported!``
We have our custom Directive mock, which allowed us to test the content without the hljs magic:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We used the migration tool of angular to convert our components to standalone versions: https://angular.dev/reference/migrations/standalone
This works fine for our application and it seems that everything works as expected. We face some issues in our tests though.
`Error: Uncaught (in promise): Highlight.js library was not imported!``
We have our custom Directive mock, which allowed us to test the content without the hljs magic:
This worked fine before, but not anymore :(
I also tried to use ng-mocks instead of our custom solution:
But this then fails with:
Can't bind to 'highlight' since it isn't a known property of 'code'
I could not find an example how this could look like.
What worked for me was not to mock highlight js but instead using it, but I was forced to do it like this:
I was wondering if there is an easier way to achieve that.
Beta Was this translation helpful? Give feedback.
All reactions