Skip Navigation
8hob.io Assertions in If-Clauses in Unit Tests: Tips and Best Practices

In unit tests, assertions inside if-clauses risk being silently skipped. We discuss some tips and best practices to avoid situations where assertions live in if-clauses.

Assertions in If-Clauses in Unit Tests: Tips and Best Practices

Generally, it is inadvisable to directly expect in if-clauses. Here are some tips to avoid these situations.

2
8hob.io A Type-Safer Alternative to Type Guards in TypeScript

Type guards rely on the programmer to be correctly defined and are error-prone. We introduce the type extractor💡, which may be a safer alternative in many scenarios.

A Type-Safer Alternative to Type Guards in TypeScript

A trick that I'd like sharing :)

2
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)8H
8hob @programming.dev
Posts 2
Comments 5