sbrownbourne.bsky.social
@sbrownbourne.bsky.social
Reposted
Write flat tests. No "describe", no scenario nesting, no beforeEach/afterEach hooks (as a rule). Each test case is self-contained, listing all the setup it needs. Use Symbol.dispose for reliable cleanup. Use granular test cases.

☝️ These things will make your tests shine.
June 14, 2025 at 11:33 AM
Reposted
ECMAScript excitement 😉

Congrats to @nicr.dev on confirming the `export defer` proposal as Stage 2 at TC39 today 🎉

This permits lazy evaluation (NOT full lazy loading) of re-exported bindings. It is useful for reducing the cost of partially-used barrel files 👍

github.com/nicolo-ribau...
github.com
April 16, 2025 at 8:07 PM