Full Stack Radio cover image

144: Gary Bernhardt - TypeScript and Testing

Full Stack Radio

00:00

Isn't Testing a Good Idea?

Tests are checking different kinds of things, and sometimes they can let you sort of approximate the same guarantees. A test is an assertion that something happens, right? Like when i do this, this thing happens. And a type, a static type, is saying nothing except this can happen. But zero point one % of the time, there is going to be a string there sery no because whatever, you made some mistake somewhere else. That's what you get without doing any work in a dynamic language. You're not going to right tests that loop every possible data type and assert that the function doesn't take it. 99 point nine% of the time you don't need that test

Play episode from 31:40
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app