Replies: 1 comment
-
|
Also having the same issues with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have tested TanStack Query for Angular and I really like it so far but I have big problems with unit testing. I even don't get the most basic tests do work unfortunately. Here you can find two really basic test example which should work but don't. The stacklitz example is using Karma but I had the same problems locally with jest ( "jest": "^29.7.0", "jest-preset-angular": "^14.0.3)
First Problem: Angular HarnessLoader ends in timeout
The first "test" is just these lines :
But it returns the error:
Async function did not complete within 5000ms. The same example is working, when commenting out the query in theselect-overview-example.tsand theselect-overview-example.htmlfile. I also played a little around with some deviations of the test (waitForAsync,detectChagens, ...) but without luckSecond Problem: The Query stays pending forever in the unit test
The second unit test is :
The test also fails as the the text stays "pending" forever. When you open the page normally you however see, that it is immediately changing to "success". Also here I tried some deviations but without luck.
Anyone getting it to work already? Any help is much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions