Skip to content

Suites v3.0.0

Latest
Compare
Choose a tag to compare
@omermorad omermorad released this 13 Jul 13:59

Suites 3.0.0 Release 🎉

We are thrilled to announce the release of Suites 3.0.0, the next evolution in testing frameworks, building on the strong foundation laid by Automock.

Automock has transitioned into Suites to better meet the needs of modern software development. Automock will continue to receive critical bug fixes, but all new features and improvements will be part of Suites. This release marks a significant milestone in enhancing the developer experience and expanding the capabilities of our testing tools.

🚀 Major Changes from Automock

Automock has officially transitioned to Suites, starting from version 3.0.0 to avoid any confusion. Automock will stop at version 2.1.0 and will only receive critical bug fixes going forward. Suites brings a plethora of improvements and a refined API.

🛠️ API Changes and Enhancements

  • Async TestBed.compile(): TestBed.compile() is now asynchronous to support dynamic importing. This change requires the use of async/await.

  • TestBed.create is now TestBed.solitary: For clearer semantics, TestBed.create() has been renamed to TestBed.solitary(). This change is part of introducing sociable testing.

  • New .sociable() Functionality: We've added a new .sociable() method to the TestBed API, allowing for more flexible and realistic unit tests. Learn more about Sociable Tests

  • Unified Imports: All Suites functionalities are now exported from @suites/unit, regardless of the adapters installed. Instead of importing from @automock/jest or @automock/sinon, you now import from @suites/unit.

  • New Mocked Type: Replacing jest.Mocked or SinonStubbedInstance, the new Mocked type from @suites/unit supports deep mocking of class properties.

  • API Changes in TestBed:

    • .mock.using() is now .mock.impl()
    • .mock.final() provides final mock behavior without runtime stubs and does not allow retrieval from unitRef.

🆕 Additional Features

  • Vitest and ESM Support: Suites now supports Vitest and ECMAScript Modules (ESM), making it more versatile and future-proof.

🔧 Migration Tool

We are developing a migration tool to help you seamlessly transition from Automock to Suites. Stay tuned for updates and check out the Migration Guide for more details.

📚 Documentation

For comprehensive details on all changes and how to migrate, please refer to the Suites Documentation.

Happy testing! 🎉