Assert on the message, not merely that something threw. A typo raising TypeError would otherwise pass.
Tag
Snippets tagged testing
Node's mock timers make anything date-dependent deterministic without injecting a clock everywhere.
One test body, many cases, and a failure that names the case that broke.
The idiomatic Go pattern: a slice of cases and a subtest per entry, each named so failures are readable.