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
It is wrong behavior and initialization of CQRS inside test module which is used for my unit tests.
I have already found and written comment inside same problem
[ ] Regression
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
My current target is to verify the handler code by calling related command via command bus.
This is a simple example of my command and handler:
It is wrong behavior and initialization of CQRS inside test module which is used for my unit tests.
I have already found and written comment inside same problem
Current behavior
My current target is to verify the handler code by calling related command via command bus.
This is a simple example of my command and handler:
Then I try to inspect it and create a unit test:
Now test fails with error:
Error: The command handler for the "AddAttacksCommand" command was not found!
Expected behavior
I expect that the code of
FooHandler
execute method will be invoked and a new console record will be printed.What is the motivation case for changing the behavior?
I also tried to use
NestFactory.createApplicationContext
instead ofTest.createTestingModule
and I received a passed test.So there two possible issues:
Environment
The text was updated successfully, but these errors were encountered: