Comment

Comment by latch

I never understood their reason for the verbose and unfriendly ergonomics:

if a != b { t.Errorf("expected %s to be equal to %s", a, b) }

Instead of something like:

t.Expect(a).To.Equal(b)

And, of course, it gets uglier when you're trying to test a function that returns a error,value tuple, which, again, is something that a more friendly testing library can help with.

parent latch 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton