Click here to Skip to main content
15,902,032 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
QuestionUnit Testing... yay or nay? Pin
Jeremy Falcon20-Apr-24 5:43
professionalJeremy Falcon20-Apr-24 5:43 
AnswerRe: Unit Testing... yay or nay? Pin
Mike Hankey20-Apr-24 6:08
mveMike Hankey20-Apr-24 6:08 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon20-Apr-24 6:17
professionalJeremy Falcon20-Apr-24 6:17 
GeneralRe: Unit Testing... yay or nay? Pin
Mike Hankey20-Apr-24 7:26
mveMike Hankey20-Apr-24 7:26 
PraiseRe: Unit Testing... yay or nay? Pin
Jeremy Falcon20-Apr-24 7:28
professionalJeremy Falcon20-Apr-24 7:28 
GeneralRe: Unit Testing... yay or nay? Pin
Mike Hankey20-Apr-24 7:30
mveMike Hankey20-Apr-24 7:30 
AnswerRe: Unit Testing... yay or nay? Pin
Mircea Neacsu20-Apr-24 6:53
Mircea Neacsu20-Apr-24 6:53 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon20-Apr-24 7:20
professionalJeremy Falcon20-Apr-24 7:20 
Mircea Neacsu wrote:
I am a fan of unit testing. So much that I wrote my own framework that I described in an article here.
Noice. Same here. It's like the more you do it, the more you see the usefulness. Kinda like eating your veggies. Laugh | :laugh:
Mircea Neacsu wrote:
Sometimes I write tests while I develop a piece of code because it's easier to verify just a small part instead of waiting to the very end.
Same. Although, I don't use Jest or a testing framework for the temp/intermediary stuff. In the JS/TS world, I'd just pop open a JSFiddle or use a Node immediate window to test stuff. If the code does that I think it will, it makes it way into the routine that I'll eventually unit test for real. Those will hang around though.
Mircea Neacsu wrote:
Most of these tests get discarded when the project is finished as they don't make much sense for a finished product.

Just the temp ones though right? You still keep the non-temp ones? I know for me, probably the best non-obvious reason to keep the non-temp ones is being able to automate finding out when someone breaks your code.
Mircea Neacsu wrote:
I never found myself writing tests in advance of the code itself as I understand you should do with TDD.
Same
Jeremy Falcon


modified 20-Apr-24 13:35pm.

GeneralRe: Unit Testing... yay or nay? Pin
Mircea Neacsu20-Apr-24 7:29
Mircea Neacsu20-Apr-24 7:29 
AnswerRe: Unit Testing... yay or nay? Pin
PJ Arends20-Apr-24 6:54
professionalPJ Arends20-Apr-24 6:54 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon20-Apr-24 7:27
professionalJeremy Falcon20-Apr-24 7:27 
AnswerRe: Unit Testing... yay or nay? Pin
RickZeeland20-Apr-24 7:01
mveRickZeeland20-Apr-24 7:01 
GeneralRe: Unit Testing... yay or nay? Pin
lmoelleb20-Apr-24 22:47
lmoelleb20-Apr-24 22:47 
GeneralRe: Unit Testing... yay or nay? Pin
RickZeeland21-Apr-24 5:53
mveRickZeeland21-Apr-24 5:53 
GeneralRe: Unit Testing... yay or nay? Pin
jschell23-Apr-24 14:57
jschell23-Apr-24 14:57 
AnswerRe: Unit Testing... yay or nay? Pin
Nelek20-Apr-24 7:59
protectorNelek20-Apr-24 7:59 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon20-Apr-24 8:17
professionalJeremy Falcon20-Apr-24 8:17 
GeneralRe: Unit Testing... yay or nay? Pin
Nelek20-Apr-24 10:13
protectorNelek20-Apr-24 10:13 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon20-Apr-24 10:38
professionalJeremy Falcon20-Apr-24 10:38 
GeneralRe: Unit Testing... yay or nay? Pin
Nelek22-Apr-24 0:17
protectorNelek22-Apr-24 0:17 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon22-Apr-24 4:27
professionalJeremy Falcon22-Apr-24 4:27 
GeneralRe: Unit Testing... yay or nay? Pin
Nelek22-Apr-24 8:19
protectorNelek22-Apr-24 8:19 
GeneralRe: Unit Testing... yay or nay? Pin
haughtonomous21-Apr-24 23:02
haughtonomous21-Apr-24 23:02 
GeneralRe: Unit Testing... yay or nay? Pin
Nelek22-Apr-24 0:15
protectorNelek22-Apr-24 0:15 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon22-Apr-24 4:36
professionalJeremy Falcon22-Apr-24 4:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.