Giter Site home page Giter Site logo

Comments (12)

s4m0r4m4 avatar s4m0r4m4 commented on May 23, 2024 1

Hi @kh-nguyen-le , we just released v1.2.8. Once you've upgraded to that version (should happen automatically in VS Code), please try again and check the output window for the test logs. This new version has some additional error handling that may show you what the issue is. It also shows the command used to launch the karma process (ng test for example), which may provide additional insight into what's going wrong here.

from angular-karma_test-explorer.

kh-nguyen-le avatar kh-nguyen-le commented on May 23, 2024

Ok, I forced @angular/cdk to update and it resolved the error traces. But the problem of not loading the tests still remains.

from angular-karma_test-explorer.

kh-nguyen-le avatar kh-nguyen-le commented on May 23, 2024

Made some progress. I investigated further and found that I had 2 global angular-cli installs in /usr/local/lib/node_modules/ and /usr/lib/node_modules/ like @markusgraube described in #53 since I had install angular long before I installed n.
However the issue is still not resolved. I uninstalled angular from both directories (one at a time) but the extension still infinitely reloads until I run ng test manually, then they show up.

from angular-karma_test-explorer.

kh-nguyen-le avatar kh-nguyen-le commented on May 23, 2024

I am on 1.2.7 and don't have the option to upgrade to 1.2.8.
Also I changed my project to use Jest so I'll have to checkout an older version to test it.

from angular-karma_test-explorer.

s4m0r4m4 avatar s4m0r4m4 commented on May 23, 2024

Sorry that's my bad, 1.2.8 is not yet released, working on that now.

from angular-karma_test-explorer.

s4m0r4m4 avatar s4m0r4m4 commented on May 23, 2024

v1.2.8 is released, let me know if the enhanced logging messages help you solve your issue. Often times the issue is that the extension is not launching karma correctly for your config.

from angular-karma_test-explorer.

KChap33 avatar KChap33 commented on May 23, 2024

v1.2.8 is released, let me know if the enhanced logging messages help you solve your issue. Often times the issue is that the extension is not launching karma correctly for your config.

Hi @s4m0r4m4, I have v1.2.8 installed and still have the same issue as descibed

from angular-karma_test-explorer.

s4m0r4m4 avatar s4m0r4m4 commented on May 23, 2024

@KChap33 are you seeing any errors/output in the VS Code Extension output window?

from angular-karma_test-explorer.

KChap33 avatar KChap33 commented on May 23, 2024

@KChap33 are you seeing any errors/output in the VS Code Extension output window?

Hi @s4m0r4m4 , no, there is no output in the extensions output window.
image

from angular-karma_test-explorer.

s4m0r4m4 avatar s4m0r4m4 commented on May 23, 2024

Ok try this - enable debug mode in settings if you have not already (search for "debug" in VS Code settings and then navigate to "Angular/Karma Test explorer"). Restart VS Code just to be safe.
Then check the output of both "Test Explorer" and "Test Explorer Logs". If nothing shows up there, then try Help -> Toggle Developer Tools and see if there are any errors in that console.

from angular-karma_test-explorer.

smv-orrin avatar smv-orrin commented on May 23, 2024

I am having a similar problem to this, where it can only find SOME of the unit tests, but not all of them. I keep having to retire/reset the tests and reload to get more tests to show up, but there seems to be an issue detecting all the tests. Note that our project structure includes components within components within components, so maybe the layering is throwing it off? Not sure, but wanted to tag this issue as important as debugging angular karma tests is pretty clutch and right now, our team is in "console.log" hell trying to work around this because we can't just debug currently.

When I look at the Test Explorer Logs, I see this show up before it gives up finding tests:

image

from angular-karma_test-explorer.

s4m0r4m4 avatar s4m0r4m4 commented on May 23, 2024

Going forward we suggest using https://github.com/lucono/karma-test-explorer

We are planning on deprecating this extension in favor of using that one, as it has more active support.

from angular-karma_test-explorer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.