frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Suites – modern unit tests framework for TypeScript back ends

https://github.com/suites-dev/suites
18•omermorad•3h ago
Hey HN!

Suites is a unit-testing framework for TypeScript backend systems working with dependency injection.

It introduces a single declarative API for unit testing: wrap any unit with a single call and receive a correct test environment for the unit and its dependencies.

  // Test a class in complete isolation, all dependencies mocked
  TestBed.solitary(OrderService).compile();

  // Or, test how it integrates with a real dependency
  TestBed.sociable(OrderService)
    .expose(PaymentProcessor) // Use the real class
    .compile();
The backstory: while working for a fast-growing fintech startup 4 years ago, my team had to write thousands of unit tests for our NestJS backend. To scale our efforts, I've built a unit-testing framework which eliminated a significant part of the tests' code and made them a whole lot more maintainable. I open-sourced it, generalized it to support more tech stacks, and soon it gained traction.

The problem - unit testing becomes a nightmare very fast:

- You mock dependencies by hand, wire them up manually, and spend more time maintaining tests than writing them. - Unit tests are leaky and error-prone since it's unclear which dependencies are mocked - Test intention is lost in the boilerplate - Each engineer invents their own conventions - Tests break during refactors because of untyped, loosely connected mocks - Missing mock implementations go unnoticed, so tests falsely fail on unexpected undefined returns or validate the wrong behavior - Test errors for wrong mocking are confusing to engineers and coding agents alike

The nitty-gritty details:

- Fluent, auto-discoverable, fully-typed API. - DI Framework Adapters: Works out of the box with NestJS and InversifyJS - Testing Library Adapters: Works out of the box with Jest, Sinon, and Vitest

Suites provide two modes of testing: (inspired by Martin Fowler's writings [0])

- Solitary: For testing units in a vacuum, it creates type-safe mocks of all the unit's direct dependencies. - Sociable: For testing units with other related units, it allows the developer to define which dependencies to mock.

Eliminating boilerplate and making mocks type-safe drastically helps coding agents (e.g. Claude Code) to write correct tests in a single pass and avoid entering infinite loops, significantly reducing token cost.

You can read more about Suites on our website: https://suites.dev

What's next?

- A dedicated skill for Claude Code - Extended docs with real-world patterns - More test utilities for common backend scenarios

Suites is fully open-source and actively maintained for 4 years. I would love you to check it out and get your honest feedback!

[0] https://martinfowler.com/bliki/UnitTest.html

Comments

iddan•2h ago
Suites has been such a help in my Nest.js projects. I can't tell you how many times we would run into issues because some mock was not properly configured. The amount boilerplate it's saving is life saving
rlapuente•2h ago
We used Suites heavily and it's an amazing tool for Nest, we couldn't leave without it
wolffan•2h ago
If you're vibe coding without this, you better get it now! Can't wait for bun support

Thermodynamic Computing Is Here

https://twitter.com/DaveShapi/status/1985697301298340087
1•delichon•1m ago•0 comments

Bullying Is Not Innovation

https://www.perplexity.ai/hub/blog/bullying-is-not-innovation
2•juokaz•3m ago•0 comments

The Poseidon Problem

https://www.nakedcapitalism.com/2025/11/coffee-break-armed-madhouse-the-poseidon-problem.html
1•speckx•4m ago•0 comments

Parallel achieves 70% accuracy on SEAL, benchmark for hard web research

https://parallel.ai/blog/benchmarks-task-api-sealqa
1•lukaslevert•4m ago•0 comments

From Billion-Dollar Flows to Gooseberry Jam: Fraser Howie's Voltairean Turn

https://worldsensorium.com/from-billion-dollar-flows-to-gooseberry-jam-fraser-howies-voltairean-t...
1•dnetesn•7m ago•0 comments

The Common Business Communication Language, by John McCarthy [pdf]

https://www-formal.stanford.edu/jmc/cbcl2.pdf
2•gglitch•8m ago•0 comments

What Is Intelligence?

https://nautil.us/what-is-intelligence-1242863/
2•dnetesn•9m ago•0 comments

Show HN: Multi-Agent Code Review

2•OliverGilan•11m ago•0 comments

Speedrunning research in 1hr with undergrads (0 research experience)

https://www.orchestra-research.com/share/qPUy7qGJjhMV
1•amberjcjj•13m ago•1 comments

Long-term use of melatonin supplements may have negative health effects

https://newsroom.heart.org/news/long-term-use-of-melatonin-supplements-to-support-sleep-may-have-...
1•michaefe•13m ago•0 comments

A Claude Code Command for Hypothesis

https://hypothesis.works/articles/claude-code-plugin/
1•alpaylan•14m ago•0 comments

Ask HN: Hedge animals for your house that only move when you're not looking?

3•amichail•14m ago•2 comments

Ask HN: Is there anything an individual can do to traceback spam calls?

1•op7•15m ago•0 comments

Show HN: Eintercon – I'm forcing people to decide on friendships in 48 hours

https://eintercon.com/
2•abilafredkb•15m ago•0 comments

Sunset – Cobot is winding down

https://blog.mainfra.me/p/sunset
1•janpio•15m ago•0 comments

How to Set Up Linux Gaming on an NTFS Drive

https://popcar.bearblog.dev/how-to-set-up-linux-gaming-on-an-ntfs-drive/
1•speckx•15m ago•0 comments

Ask HN: Best internationalization solutions for SaaS?

https://github.com/aymericzip/intlayer
1•aurelb•16m ago•1 comments

ChatGPT, is there a seahorse emoji?

https://chatgpt.com/share/690a4e31-0940-800d-823b-fa22342074c9
1•ghgr•17m ago•0 comments

Show HN: Idle Fishing Simulator – A relaxing idle game about fishing (Android)

https://play.google.com/store/apps/details?id=com.nervousibexgames.idlefishingsimulator&hl=en_US
1•NervousIbexDev•19m ago•0 comments

Apple discontinuing support for older Home architecture in February 2026

https://appleinsider.com/articles/25/11/03/apple-discontinuing-support-for-older-home-architectur...
1•bookofjoe•19m ago•0 comments

The Terrible Technical Architecture of My First Startup

https://blog.jacobstechtavern.com/p/my-terrible-startup-architecture
3•jakey_bakey•19m ago•0 comments

Amazon Equips Next Underwater Cable with 'Robust Armoring' to Prevent Cuts

https://www.pcmag.com/news/amazon-equips-next-underwater-cable-with-robust-armoring-to-prevent-cuts
3•walterbell•26m ago•1 comments

We're ill-prepared to combat the threat of space terrorism

https://www.rnz.co.nz/news/on-the-inside/577852/the-threat-of-space-terrorism-is-no-longer-scienc...
4•billybuckwheat•26m ago•0 comments

Pivots, Paths, and Prototypes

https://debliu.substack.com/p/pivots-paths-and-prototypes
1•kiyanwang•27m ago•0 comments

In Pursuit of Democracy

https://pudding.cool/2025/11/democracy/
2•c-oreills•28m ago•0 comments

IBM to Cut Roles in Focus on Software Growth

https://www.bloomberg.com/news/articles/2025-11-04/ibm-to-cut-thousands-of-roles-in-focus-on-soft...
2•toomuchtodo•29m ago•1 comments

Elon Musk claims Tesla's new AI5 chip is 40x more performant than previous-gen

https://www.tomshardware.com/tech-industry/elon-musk-claims-teslas-new-ai5-chip-is-40x-more-perfo...
2•alexellisuk•31m ago•0 comments

Copy command recursively copies itself `cp -r [dot] src dst`

https://twitter.com/_diginova/status/1985781161134809212
2•diginova•32m ago•1 comments

Gaza Riviera: from devastated territory to digital age commoditiy

https://www.ynetnews.com/opinions-analysis/article/s1ikwpwkzx
1•datelligence•32m ago•0 comments

Man spent 200 days building a solar-powered explorer yacht that can run forever

https://supercarblondie.com/solar-powered-explorer-yacht-helios-11/
9•rmason•34m ago•0 comments