❓[SUPPORT]: How to test selectors with injected state. #1895
Unanswered
mateuszobara
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi I am using NGXS state managment library in my App and I have selector like below and everything is working fine but when I am testing my app I have got error like below. PrintItemsState is lazy loaded and in *.spec.ts NGXS module is imported like NgxsModule.forRoot() . What I noticed problem is that im passing PrintItemsState as argument here:
@Selector([PrintItemsState])
what is weird if I move selectors inside state class as memoized selectors it is working fine but then i have mixed actions and selectors together in one file and I want to avoid this. Below is an example situation when tests are passing:
I will be graceful for any suggestions what I am dointg wrong.
Beta Was this translation helpful? Give feedback.
All reactions