✳flâneur — a map of the web's best reading
Is this true?
notes.jordanscales.com · 1,611 words · saved by 1 readers
That's pretty much the same code. There is no else, so we'll get to the end and return undefined - which is not true.
Is this true? Is this true? You're writing some code - maybe building out some new features - and it's time to test your work. For some reason, you named your function fn and, for some reason, you want the result to be true . describe ( "our function" , ( ) => { it ( "returns true" , ( ) => { expect ( fn ( ) ) . toBe ( true ) } ) } ) A pretty reasonable scenario, right? Let's make it unreasonable. Pretend you're the unit test, and instead of the describe and it above, I'll give you a function and you’ll tell me if it returns true when it's called. Is this true? function fn ( ) { return true }
Explore this link on the map →related reading
- CSC 151 - Unit Testingeikmeier.sites.grinnell.edu
- Control Flow - The Rust Programming Languagedoc.rust-lang.org
- Intrinsic Values Test | Discover What Your Most Important Values Are | ClearerThinking.orgprograms.clearerthinking.org
- GitHub - mawrkus/js-unit-testing-guide: 📙 A guide to unit testing in Javascript · GitHubgithub.com
- 3. Logic - Mathematics in Lean v4.19.0 documentationleanprover-community.github.io
- Vacuous truth - Wikipediaen.wikipedia.org
- Program Structure :: Eloquent JavaScripteloquentjavascript.net
- CSC 151 - Conditional evaluation in Schemeeikmeier.sites.grinnell.edu
- Reading 2: Testingweb.mit.edu
- Control Flow · Crafting Interpreterscraftinginterpreters.com
- There are Only Four Billion Floats-So Test Them All! | Random ASCII – tech blog of Bruce Dawsonrandomascii.wordpress.com
- Branchless Equivalents of Simple Functions | Harder, Better, Faster, Strongerhbfs.wordpress.com