Tuesday, April 22, 2025
HomeGolangpresent construct errors in exams? - Getting Assist

present construct errors in exams? – Getting Assist


In my undertaking

  • go construct succeeds
  • go take a look at fails with [build failed] with only a package deal title.

How can I see construct errors in take a look at information typically? Or a minimum of during which file the error is?

As it’s, all I can do is to open all information within the package deal in hope that IDE will spotlight the error for me.

Are you able to present every command and the output? For instance:

~/P/dotconfig (predominant|✔) $ go construct
~/P/dotconfig (predominant|✔) $ go take a look at
PASS
okay      github.com/DeanPDX/dotconfig    0.147s
~/P/dotconfig (predominant|✔) $

It relies on your testing framework and construct system. Most often, enabling verbose logging (--verbose or -v flags) and configuring your CI/CD pipeline to seize construct output might help. Are you utilizing Jest, Mocha, or one other testing framework

go construct -v provides no output
go take a look at reveals compile errors, but it surely doesn’t cease there, it executes all take a look at which needlessly take time and leads to doubtlessly hunderds of strains about failed exams (which occurs in the course of improvement) which I don’t wish to see.
go take a look at -v is even worse as a result of it additionally reveals details about handed exams.

I exploit go.testing from stdlib 1.24.1 for exams and stretchr/testify for assertions.

For now I’m involved about native improvement, I shouldn’t commit a code which doesn’t even compile, proper?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments