Keep your tests to the following format:
Given: an initial test state
When: an action happens
Then: assert against the result
If your test doesn't have that middle step then you aren't testing any behaviour, consider deleting the test.
This is book is your shortcut to building apps better. I wish it was available when I was learning how to build composable software:
https://t.co/tOgJP9QaLf
Being a full stack dev gives you a fantastic view of the entire Dev process.
Today I
- Fixed a CSS bug
- Refactored the bootstrap function for a server
- Built a new CI pipeline to automate deployment, e2e tests and release
Did you know this is valid?
const [count, setCount] = React.useState(() => 0)
// count is 0
If not, and you're wondering why you'd ever want to pass a function to useState, then you haven't watched https://t.co/5bXXFhyXnz yet 😉
Want to know how to create to create a React application, store it with GitHub and share it with the world using Netlify?
Check out my latest post!
https://t.co/8qDqH0uTot
My new software dev blog site is live!
https://t.co/rJydmgfXOA
Check out my first blog post:
Building a Reusable Auth Component with Closure
https://t.co/0Ul45XfkUK
LAUNCH DAY 🎉🎉
Introducing https://t.co/WB8LO2UJsY, a React codebase generator. Select the stack you want, pick a template, then export a complete React codebase. Everything just works ✨
🎉 TEMPLATES ARE NOW LIVE ON @codesandbox! 🎉
Now you can convert any Sandbox into a Template, which you can then use as a boilerplate for new projects! Templates make it easy for you to customize dependencies, files and folder structure, config & more!
https://t.co/jzyHoLEajM
what to test?
- everything that involves calculation
- everything that has already broken
- every state machine needs tests
- to ensure that something works like you think it works
- everything that you are afraid to break