Post

πŸ’‘ Use "using" for Vitest/Jest mocks/spys It's really nice to simplify You don't need manual mockReset / global afterEach cleanups anymore

Rob Palmer@robpalmer.bsky.social

ECMAScript excitement πŸ˜‰ Congrats to @chronicles.org on meeting the conditions for Explicit Resource Management to be Stage 4 at @tc39.es today πŸŽ‰ It introduces `using` declarations and the Symbol.dispose protocol to deterministically and ergonomically release resources πŸ‘ github.com/tc39/proposa...

6 reposts58 likes

Yes, it’s my favourite use case so far. The one thing I do miss still, is the ability to use it without declaring a variable. But there’s already another proposal to solve that.