r/javascript • • Mar 21 '26

testoise - lazy, type-safe test variables for Bun, Vitest, and Jest (inspired by RSpec)

Thumbnail github.com
6 Upvotes

Built a small library that replaces the let + beforeEach reassignment pattern with RSpec-style lazy variables. Define with def, access with get. Variables evaluate lazily, cache per test, and dependents re-evaluate automatically when overridden in nested blocks. Fully type-safe with a suite wrapper for automatic TypeScript inference.

Zero dependencies, MIT licensed. Feedback welcome!


r/javascript • • Mar 21 '26

AskJS [AskJS] Making an SVG interactable

1 Upvotes

So im a beginner in CSS and JS and im making my first portfolio. I have this idea that i dont know if its possible to make it work in the way im thinking. I have an SVG design, like a simple 2d drawing i made in AI and i made it into a bitmap. Would it be possible to put that SVG in my project and make the individual squares appear/dissapear on hover? I wanna put it on the main banner.

I really have no idea if this is even possible or if i would have to just copy the design square by square in CSS, so any advice would be helpful!


r/javascript • • Mar 21 '26

Showoff Saturday Showoff Saturday (March 21, 2026)

2 Upvotes

Did you find or create something cool this week in javascript?

Show us here!