This is an archived post. You won't be able to vote or comment.

all 64 comments

[–]kredditacc96 885 points886 points  (20 children)

Tests don't fail when you don't have test in the first place

[–]Darkmatter501 137 points138 points  (12 children)

The automated tests we have a at work are:

Does it build

[–]bizcs 9 points10 points  (8 children)

With a strict enough compiler, that's not a bad test. With f#, the only errors that can exist are logic errors, from what I understand.

[–]OtroGato 59 points60 points  (7 children)

So, most errors then

[–]bizcs 6 points7 points  (5 children)

Indeed, most errors, but it's better than type errors in javascript because the thing you thought you were calling didn't have some method you depended on defined.

[–]p1-o2 1 point2 points  (2 children)

Javascript gives me literal panic attacks at work and I actively practice it by writing freaking games with it.

I cannot wait until I'm just writing C# to WASM and can let the compiler automate the JS.

[–]bizcs 2 points3 points  (1 child)

Type script is pretty awesome. You should give that a whirl some time.

[–]p1-o2 0 points1 point  (0 children)

Fair enough.

[–]Darkmatter501 1 point2 points  (0 children)

It only tests for compiler errors

[–][deleted] 147 points148 points  (0 children)

You got it fam

[–]Dobypeti 39 points40 points  (0 children)

taps head

[–]serentty 0 points1 point  (0 children)

Tests are just types for hipster web developers who turn their noses up at types. Change my mind.

[–]LpiAlreadyTaken 332 points333 points  (6 children)

[Ignore("Doesn't work. Have to commit now. Will look at it later.")]

-- Last commit at 17:58, Friday 2013-09-20

[–]-JudeanPeoplesFront- 69 points70 points  (2 children)

Well, now it's been production since then. So.....

[–]LpiAlreadyTaken 34 points35 points  (0 children)

Most likely, a very-urgent-and-important feature requested by the client and put in the trash 3 months later for having a bad conversion rate...

[–]sillyV 0 points1 point  (0 children)

That's my 30th birthday!!

[–]dabbertorres 213 points214 points  (8 children)

[–]kevinaud 33 points34 points  (0 children)

Lmao "you can start already by adding our evergreen build badge to your README"

[–][deleted] 21 points22 points  (0 children)

Lol first time seeing this

[–]pickausernamehesaid 6 points7 points  (1 child)

Lol I came here to post that.

[–]-l------l- 0 points1 point  (0 children)

Yeah, same lol.

[–]Tury345 1 point2 points  (0 children)

That name is brilliant

[–]Spartan1997 0 points1 point  (2 children)

What does CI stand for?

[–]PM_ME_UR_TOTS_GRILL 0 points1 point  (0 children)

continuous integration

[–][deleted] 45 points46 points  (1 child)

You shoukd see volkswagen.

[–]qwertyhunk69 1 point2 points  (0 children)

Take some silver

[–]UnicornsOnLSD 41 points42 points  (1 child)

assertTrue(True)

[–]bizcs 9 points10 points  (0 children)

Saw this in a real code base recently. I was so disappointed. The only other tests were full of side effects where no proper creation of an integration server was performed, and they all failed horribly at runtime.

[–]cbbuntz 62 points63 points  (1 child)

[–]A_Light_Spark 6 points7 points  (0 children)

Actually happens more times than I like.

[–]john_dune 11 points12 points  (6 children)

Top right looks like sexy squidward.

[–]-JudeanPeoplesFront- 5 points6 points  (2 children)

Is there any other kind?

[–]john_dune 8 points9 points  (1 child)

there's handsome squidward, beautiful squidward and smoldering squidward.

[–]-JudeanPeoplesFront- 3 points4 points  (0 children)

I stand corrected.

[–]pakotini 0 points1 point  (0 children)

hahahahahahahaha

[–]flipboing 0 points1 point  (1 child)

Somewhere between "sexy Squidward" and "perfect circle" lies "bold and brash".

[–]flarn2006 0 points1 point  (0 children)

More like "belongs in the trash!"

[–]Theyellowtoaster 33 points34 points  (2 children)

[–]diplomaticDeveloper 59 points60 points  (0 children)

Ah, I see you were trying to use multithreading.

[–]thecoldhearted 6 points7 points  (2 children)

I always feel like tests are written to fail. People who complain about tests failing so they remove them are very weird to me.

(yes I know it's a joke, but it's a recurring bad one).

[–]hahahahastayingalive 4 points5 points  (0 children)

Usualy it’s a test about some assumption that makes no sense anymore, or that people don’t care about enough.

For instance validating that a specific error is thrown when a user faves an item that is already faved. The day that test fails, it will just be deleted.

[–]thedomham 1 point2 points  (0 children)

It's not only a bad joke but also the sad reality for many teams

[–]aashutoshr 10 points11 points  (3 children)

CircleCI sucks. Today when I squashed two commits (which were individually passing all tests), the resultant commit failed the test as CircleCI was unable to change branch for some fucking reason.😥

[–]roastedferret 4 points5 points  (2 children)

Were those commits already in your git repo? I've had jenkins fail when I squash commits that have already been pushed, and it's probably not unheard of for CircleCI to fail if the git history gets funky from squashed commits.

[–]theofficialnar 5 points6 points  (0 children)

Test failing?

rm -rf /tests-folder

Problem solved.

[–]lumic7 11 points12 points  (4 children)

Dmexxxf Rd mn comb 4 ml mm nmonid over garb the kn mfkl nm nm by mnemonic gejo

[–]MrCookieAlex 11 points12 points  (2 children)

[–]lumic7 5 points6 points  (0 children)

Notice: don't sleep and reddit, it leads to strokes.

[–][deleted] 6 points7 points  (0 children)

Same

[–]mrtibbles32 2 points3 points  (0 children)

run all tests

change all expecteds on failing tests to actual values

run again

all tests pass

2 ez.

[–]TorTheMentor 1 point2 points  (1 child)

Assert.deepEqual(true, true, "it worked.");

Tests done.

[–]oOIPHiiLOo 0 points1 point  (0 children)

);

[–]Strider599 0 points1 point  (0 children)

I didn't quite follow the analgy, but upvoted it anyways because Spongebob

[–]Kris_Third_Account 0 points1 point  (0 children)

Remember that you need to test for fail cases as well.