Skip to content

v4.1.2

Latest

Choose a tag to compare

@suites-release-bot suites-release-bot released this 05 Nov 15:13
· 11 commits to master since this release
v4.1.2
2a69a59

Suites Unit v4.1.2 (2026-11-05)

Documentation: https://suites.dev/docs

Suites Unit 4.1.2 fixes TypeScript errors when abstract classes are used as dependency tokens. Pass abstract classes directly to .mock() and unitRef.get() without constructor casts, with typed Jest and Vitest mocks. This works with the NestJS, Inversify, and InjectionJS adapters.

Bug Fixes

  • unit, core.unit
    • Accepts abstract dependency tokens in mock configuration and lookups, including .impl() and .final() overrides. Fixes the abstract-constructor error reported in #1006 and discussion #737. (#1105)
  • doubles.jest, doubles.vitest
    • Infers typed mocks from abstract class tokens, preserving method signatures and mock APIs. (b2c9123, 8d9300a)
  • types.common, types.di
    • Adds AbstractType<T> for dependency tokens while keeping Type<T> for concrete constructors. TestBed.solitary(), TestBed.sociable(), and .expose() continue to require concrete classes. (184da26, 01c432b)

Enhancements

  • *

    • Adds abstract-token E2E coverage across all ten Jest/Vitest adapter fixtures, including CommonJS and ESM configurations, on Node.js 22, 24, and 26. Tests cover inferred mocks, implementations, final values, sociable dependencies, and Inversify named metadata. (cfe00c6)
  • di.nestjs, di.inversify, di.injectionjs, types.doubles

    • Releases dependency-only patches to consume the updated shared types. Supported framework and Node.js versions remain unchanged. (#1108)
  • *

    • Refreshes all ten package READMEs with consistent 90px branding, current declaration setup, verified examples, and official NestJS/Inversify documentation links. (#1107)

Full Changelog: v4.1.0...v4.1.2