#Unit testing a component with input output and its content "synchronization"

2 messages · Page 1 of 1 (latest)

foggy folio
#

I have an input and output, say tags and tagsChange in a component. When I am testing some function with @HostListener that emits tagsChange, the tags changes as well. This caught me off guard. Tested function without @HostListener does not behave like this.

Is Angular handling it on the background of @HostListener? Can I achieve this somehow for methods without @HostListener as that would make the test easier?

deft mulch
#

Don't describe your code. Post it. That way we can explain why that code behaves a certain way. See #how-to-get-help