Git Product home page Git Product logo

Comments (9)

hbenl avatar hbenl commented on June 9, 2024 1

You could try replacing socket.io with some "raw" networking code.
There's an example here from some (unfinished) experiments I did a while back to let the Mocha Test Adapter run mocha tests remotely. In that case I couldn't use the communication channel from node's child_process package, so I wrote some IPC code myself:
createConnection() will create a client connection, if the connection is rejected or closed immediately, it will keep retrying for a configurable amount of time and then give up.
receiveConnection() is the counterpart on the server side: it will open a port for receiving connections and close it immediately when a connection is received (because we only want to accept exactly one connection). If no connection is received within a configurable amount of time, it will give up.
Both functions return a net.Socket if the connection is successfully established. Now we need to put a simple message passing protocol on top of the raw data stream: I used JSON.stringify()/JSON.parse() and the split2 package for that, simply use the writeMessage()/readMessages() functions.
I haven't tested the code much, but I think it's worth a try.

from angular-karma_test-explorer.

hbenl avatar hbenl commented on June 9, 2024 1

Awesome! Glad to see your heroic effort come to fruition :)

from angular-karma_test-explorer.

Raagh avatar Raagh commented on June 9, 2024

Hey @hbenl yes for sure I will try that. Thank you very much. I am making some changes so the test mapping supports suites inside of suites(infinite amount) as currently only supports one level of suites. After that I will take a look at this ;). After this 2 changes I think a preview release will be ready. What do you think? Anything else you think I should include on an initial release?

from angular-karma_test-explorer.

hbenl avatar hbenl commented on June 9, 2024

I'd say release early, release often ;)
Even if it doesn't cover everything yet, the adapter will probably be useful for a lot of people already. Just point out in the Readme that it's still under development and that people should create and vote on issues - that will give you a clearer picture what remains to be done and what people need most urgently.

from angular-karma_test-explorer.

hbenl avatar hbenl commented on June 9, 2024

One more thought: It seems to me that this adapter could be easily adapted to support non-angular karma tests, so perhaps you might want to change the name to "Karma and Angular Test Explorer" or something similar (?) (even if the non-angular karma support will be done later)

from angular-karma_test-explorer.

Raagh avatar Raagh commented on June 9, 2024

@hbenl yeah you re right. I should decide on that before publishing. And yes I was planning on supporting karma as all the logic it's the same. I just need to add a new class that starts karma server instead of doing ng test. Should not be any issue at all.

from angular-karma_test-explorer.

Raagh avatar Raagh commented on June 9, 2024

@hbenl hey, so before publishing it I think the test explorer should be able to show the failure messages from angular when a test failed. I have the errors, for now I will just try to push it to the vscode output( eventually support decorations as in your jasmine-test-adapter). how do you do to show message in vscode output? also, I see a Test Explorer tab in the ouput, how can I send messages to that one?

from angular-karma_test-explorer.

hbenl avatar hbenl commented on June 9, 2024

For the failure message use TestEvent#message - it will be shown in the "Test Explorer" output channel when the test is clicked.
For the decorations use TestEvent#decorations.

from angular-karma_test-explorer.

Raagh avatar Raagh commented on June 9, 2024

https://marketplace.visualstudio.com/items?itemName=raagh.angular-karma-test-explorer

cant thank you enough. I am gonna keep working to make it great

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.