jargon

Design patterns·Making things

two tests passed on their own and failed together, because the thing they both reached for kept state between them.

Singleton

Also calledsingleton pattern, single instance

A class that permits exactly one instance and provides global access to it. The instance-count half is almost never the requirement — what people actually want is 'one connection pool', which lifetime configuration in a container gives them without the global. The access half is the damage: an unreplaceable dependency nothing declares, invisible in every signature, and shared across tests that were supposed to be independent.

Commonly confused with