Skip to content

v4.1.3

Latest

Choose a tag to compare

@suites-release-bot suites-release-bot released this 16 Nov 02:39
· 48 commits to master since this release
v4.1.3
e08df92

v4.1.3 (2026-11-16)

v4.1.3 fixes accessors supplied to Jest and Vitest mocks and corrects unused-override warnings. @suites/unit@4.1.3 requires Core 4.1.3 so installs of Unit include the warning fix.

Published packages: @suites/core.unit@4.1.3, @suites/doubles.jest@4.1.3, @suites/doubles.vitest@4.1.3, and @suites/unit@4.1.3. The DI and shared-types package versions are unchanged.

Accessor behavior: During construction, mock() and .mock(...).impl(...) no longer read or write enumerable supplied accessors. Enumerable getter/setter-backed objects are wrapped on first access instead of being written back through the setter during construction. Explicit writes to non-configurable accessor pairs now reach their setter. Tests relying on the previous call counts, write-back, or ignored writes may need updating.

This applies to accessors supplied in a mock implementation. An unconfigured class getter still receives the existing lazy mock default; Suites does not infer its value from the original class. For a fixed value such as isCli: false, configure it with .mock(ConfigService).impl(() => ({ isCli: false })). To spy on a getter, supply a configurable getter in .impl(...) first.

Bug Fixes

  • doubles.jest, doubles.vitest
    • Preserves getters and setters without evaluating them while configuring mocks, addressing #593. Enumerable getter/setter-backed objects are mocked lazily when accessed. (#1128, Jest fix, Vitest fix)
  • core.unit, unit
    • Tracks which named or tagged mock override was selected, so another override for the same token is correctly reported as unused. Unit now requires the corrected Core patch. (#1128, #1134)

Enhancements

  • *
    • Adds a previous-release consumer compatibility check to package publication. The 4.1.3 release passed 30 comparisons using published 4.1.2 consumer tests across Jest/Vitest adapters and Node.js 22, 24, and 26, plus a subclass regression check. (#1134)

Full Changelog: v4.1.2...v4.1.3