All releases

v3.2.0

Collection assertions can now express an exact total and the matching document breakdowns in one fluent chain.

Highlights

  • 01

    Count matching document assertions

    hasDocumentCount now accepts nested document assertions and verifies exactly how many documents satisfy them, keeping the collection-state table when the count is wrong.

    Read the guide →
  • 02

    Assert a matching floor

    The matching hasDocumentCountAtLeast overload applies the same nested assertion mechanism when a breakdown may continue to grow.

    Read the guide →

Full notes

Added

  • MongoCollectionAssert adds hasDocumentCount(expected, requirements) for exact predicate counts and hasDocumentCountAtLeast(expected, requirements) for matching count floors. Both methods are fluent and include collection diagnostics on failure.