Releases: disneystreaming/weaver-test
v0.6.0 / v0.7.0 : cats-effect 3 and other goodies
v0.6.0 / v0.7.0
This is a twin-release : 0.6.x series retains CE2 compatibility, whilst 0.7.x indicates CE3 compatibility. See installation page of the docs for a view of the compatibility matrix.
What happened since 0.5.x ?
Massive under the hood changes
- The whole test framework is now effect specific (as opposed to be orchestrated in cats-effect's IO)
- On JVM, all test suites are now weaved in a single IO before being run unsafely (as opposed to one suite == one "unsafeRun" call previously). Cross-suite parallelism is still dependant on whatever settings are defined in the build (sequential by default on forked JVMs, parallel by default otherwise).
- weaver is now compatible with Scala 3 (specifically 3.0.0-RC2 at the time of writing this)
Intellij integration
- The Intellij integration now works without any bespoke plugin installation, by means of a JUnit runner. Unfortunately, the UX is not as rich as what the bespoke plugin was offering, but this new approach drastically lowers the maintenance burden on ourselves
Quality of life changes
- Adds expect.same for nicer-looking equality comparisons
- Removes the need to ascribe types in Checkers (scalacheck)
- Removes simpleTest as it overlaps with one of the test overloads
- Removes Expectations => F[Expectations] implicit conversion as it was leading users to use expectations in for-comprehensions, when in fact that had no effect, thus breaking principle of least surprise
- Adds a construct for resource memoisation, that users can use (optionally) to share constructs between suites a bit more efficiently
- The zio integration now uses a fiber-ref logger, that can be injected into the shared resource (thanks to @lukecollier)
- On JS, the results are now properly aggregated and displayed at the end of the run
- A
FunSuite
trait now exists for people who want to write effect-less unit tests - Integration with typelevel's Discipline is now provided
Thanks a lot to everyone, contributors and users
This library is just a test framework that stands on the shoulder of giants, but we're massively thankful to our users who drop the occasional kind word !
Head over to the website for documentation 😄, and feel free to hit us up on gitter for questions and remarks !
0.6.0-M7 (CE2) and 0.7.0-M7 (CE3)
We're excited to announce the next milestone release of Weaver!
As with previous releases:
- If you're using Cats Effect 2, use 0.6.0-M7
- If you're using CatsEffect 3, use 0.7.0-M7
Cats Effect 3 final
With the release of Cats Effect 3.0.0 and fs2 3.0.0 this is the first release of weaver built against those versions.
This release is built against Cats Effect 3.0.1
Scala 3.0.0-RC1
The support for 3.0.0-M3 is dropped, and this release is published against Scala 3.0.0-RC1
Bug fixes
- Prevent tests from hanging if global resource acquisition fails #229
v0.6.0-M6
- Expecty 0.15.1: https://github.com/eed3si9n/expecty/releases/tag/v0.15.1
- Specs2-matcher updated to 4.10.6
v0.6.0-M5
- Adds
expect.same
for equality comparisons - Removes the need to ascribe types in Checkers (scalacheck)
- Removes
simpleTest
as it overlaps with one of thetest
overloads - Removes
Expectations => F[Expectations]
implicit conversion as it was leading users to use expectations in for-comprehensions, when in fact that had no effect, thus breaking principle of least surprise - Adds a construct for resource memoisation, that users can use (optionally) to share constructs between suites a bit more efficiently
Scala 3.0.0-M3
Thanks to the gigantic efforts of @keynmol, this is the first release that is compatible with Scala 3 (milestone 3).
Unfortunately, this also marks the renaming of the forall
method that operate on foldable constructs to forEach
, as it was creating annoying conflicts with the scalacheck-related forall
methods.
v0.6.0-M3 : bump CE3/fs2 milestones
Latest CE3 and fs2-3 (#170) * Latest CE3 and fs23 * Bump fs2 to 2.5.0
CE3 Cross build
This version builds artifacts against CE3 (3.0.0-M4) in addition to CE2. The CE3 artifacts are versioned with an incremented minor.
v0.6.0-M1
This work aims at narrowing the gap required to be jumped for CE3 compatibility.
Breaking changes :
- The test framework is now effect-specific, meaning that some configuration is needed in your build depending on the effect-type you use.
- The GlobalResource API is now tied to the preferred effect type of the user (as opposed to being de-facto cats-IO based)
Runtime semantics changes :
- On JVM, per compile-unit (aka module, aka "sbt project"), all test suites are now weaved in a single IO before being run unsafely (as opposed to one suite == one "unsafeRun" call previous). Cross-suite parallelism is still dependant on whatever settings are defined in the build (sequential by default on forked JVMs, parallel by default otherwise). In theory most users should not be impacted by this change.
- On JS, the results are now properly aggregated and displayed at the end of the run
WTH is going on here ?
CE3 is removing the abstraction allowing to "unsafeRun" effects. It is also removing the abstraction allowing to switch from one effect to cats'IO. These features are currently heavily used by weaver, which currently runs one IO per suite.
We're making the decision to drastically change the internals of the framework in order to support an upgrade to CE3. Overall, this means that weaver now comprises 4 different test frameworks, one per effect-type currently existing in the ecosystem (cats-effect, monix, monix-bio, zio). All of them delegate to a generic one, which runs a single IO per run (ie compile-unit), and communicates with the build tool via an ad-hoc promise/concurrent queues based protocol. However each framework has a thin, effect-specific layer associated to it that dictates how things run (essentially calling the unsafeRun equivalent of the effect type).
This means that weaver is becoming more respectful of the choices of its users, as cats-IO will not be run, at all, if users prefer using monix. It also means that features such as "Global Resources" can now be interacted with in terms of whichever effect type is preferred by the user.
v0.5.1: Update Intellij to 203
This maintenance release upgrades the Intellij plugin to be compatible with Intellij 203 series.
v0.5.0: Intellij plugin / Monix / Expectations rework
Changeset : v0.4.3...v0.5.0
A huge thank you to @hwielenberg and @bfdes.
Features / improvements
- weaver now comes with its own intellij plugin, courtesy of @hwielenberg
- monix and monix-bio integration modules, courtesy of @bfdes
- SingleExpectation has disappeared. It was used as an intermediate output of
expect
, waiting for implicit conversion (required to capture SourceLocation) targetingExpectations
. Now, the source location is directly exposed from the expect macro, making the little Single => Expectations dance obsolete. This should smoothen up some corner cases. - Addition of an
expect.all
method that takes boolean varargs, reducing the boilerplate of long chains of&&
- Expectations now carry a
NonEmptyList[SourceLocation]
, making it possible to capture several locations and associate them to expectations, facilitating debugging of failures when indirections are involved.
Compatibility-breaking changes (that most users shouldn't notice)
- test methods now require a TestName instead of a String. TestName is a wrapper containing a string a source location. It is used for IDE support. The end-user should not see much of a difference as a String => TestName implicit conversion method is provided.
- EffectSuite does not extend Expectations.Helpers anymore. However, IOSuite and co still do (the inheritance relationship has been pushed down the hierarchy to facilitate customisation)
- SingleExpectation has disappeared (it was only a workaround as the
expect
macro didn't expose location information) expect
is no longer impacted by the presence of an implicitSourceLocation