Code Monkey home page Code Monkey logo

Comments (7)

dnephin avatar dnephin commented on May 20, 2024

I was hoping to be able to do one package per line as well. When I went to implement the format I noticed that the output from test2json is not necessarily ordered in the way you would expect. The start package event would be sent before the previous test had finished running.

Because of the ordering you'd end up with the dots on each line not matching the tests in the package, which I found to be misleading. The problem still exists with the single line format, but at least that way it doesn't look as much like the dots necessarily match the proceeding package.

I'm not sure if that behaviour has changed in a more recent version of Go. I believe it has to do with go test running multiple packages in parallel by default. I think it's probably worth revisiting to see if there is some way to make it work.

from gotestsum.

silvin-lubecki avatar silvin-lubecki commented on May 20, 2024

The problem still exists with the single line format, but at least that way it doesn't look as much like the dots necessarily match the proceeding package.

If I understand that correctly, it means that a test dot can be printed to another package? And so if we have a failing test, it can be printed to a wrong package, then misleading if you try to find the failing test in the wrong package?
If that is the case, I don't think the dot format is really useful 🤔

from gotestsum.

dnephin avatar dnephin commented on May 20, 2024

Ya, it probably isn't. I kept it around hoping there would be some way to fix it.

I think one package per line would be possible by keeping track of which package is on which line and moving the cursor to print on that line, like how download progress clis work, but I expect that would be some work.

from gotestsum.

silvin-lubecki avatar silvin-lubecki commented on May 20, 2024

keeping track of which package is on which line and moving the cursor to print on that line, like how download progress clis work

Yep I thought about that too

but I expect that would be some work.

Sure it would 😄

from gotestsum.

silvin-lubecki avatar silvin-lubecki commented on May 20, 2024

Should I close this issue?

from gotestsum.

dnephin avatar dnephin commented on May 20, 2024

I think we should keep it open. It is a good idea, and maybe one day it will get implemented.

from gotestsum.

dnephin avatar dnephin commented on May 20, 2024

I put up #79 which implements this format

from gotestsum.

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.