FlatIOSpec

trait FlatIOSpec extends CatsEffectSuite with ScalaCheckSuite
trait ScalaCheckSuite
class CatsEffectSuite
trait CatsEffectFunFixtures
trait CatsEffectFixtures
trait CatsEffectAssertions
class FunSuite
trait BaseFunSuite
trait ValueTransforms
trait SuiteTransforms
trait TestTransforms
trait TestOptionsConversions
trait FunFixtures
trait Assertions
trait CompileErrorMacro
class Suite
trait PlatformSuite
class Object
trait Matchable
class Any

Type members

Inherited classlikes

class FunFixture[T]
Inherited from:
FunFixtures
object FunFixture
Inherited from:
FunFixtures
implicit class MUnitCatsAssertionsForIOBooleanOps(io: IO[Boolean])
Inherited from:
CatsEffectAssertions
implicit class MUnitCatsAssertionsForIOOps[A](io: IO[A])
Inherited from:
CatsEffectAssertions
implicit class MUnitCatsAssertionsForIOUnitOps(io: IO[Unit])
Inherited from:
CatsEffectAssertions
implicit class MUnitCatsAssertionsForSyncIOOps[A](io: SyncIO[A])
Inherited from:
CatsEffectAssertions
implicit class MUnitCatsAssertionsForSyncIOUnitOps(io: SyncIO[Unit])
Inherited from:
CatsEffectAssertions
final class SuiteTransform(val name: String, fn: List[Test] => List[Test]) extends List[Test] => List[Test]
Inherited from:
SuiteTransforms
implicit class SyncIOFunFixtureOps[T](fixture: SyncIO[FunFixture[T]])
Inherited from:
CatsEffectFunFixtures
final class TestTransform(val name: String, fn: Test => Test) extends Test => Test
Inherited from:
TestTransforms
final class ValueTransform(val name: String, fn: PartialFunction[Any, Future[Any]]) extends Any => Option[Future[Any]]
Inherited from:
ValueTransforms

Deprecated and Inherited classlikes

@deprecated("Use ResourceFunFixture", "2.0.0")
Deprecated
Inherited from:
CatsEffectFunFixtures
@deprecated("Use ResourceSuiteLocalFixture", "2.0.0")
Deprecated
Inherited from:
CatsEffectFixtures

Types

opaque type ShouldAction

Inherited types

final type AfterEach = AfterEach
Inherited from:
Suite
final type BeforeEach = BeforeEach
Inherited from:
Suite
final type Fixture[T] = Fixture[T]
Inherited from:
Suite
final type Test = Test
Inherited from:
Suite
final type TestValue = Future[Any]

The value produced by test bodies.

The value produced by test bodies.

Inherited from:
Suite

Value members

Inherited methods

def afterAll(): Unit

Runs once after all test cases and after all suite-local fixtures have been tear down.

Runs once after all test cases and after all suite-local fixtures have been tear down.

Inherited from:
Suite
def afterEach(context: AfterEach): Unit

Runs after each individual test case.

Runs after each individual test case.

Inherited from:
Suite
def assert(cond: => Boolean, clue: => Any)(implicit loc: Location): Unit
Inherited from:
Assertions
def assertEquals[A, B](obtained: A, expected: B, clue: => Any)(implicit loc: Location, compare: Compare[A, B]): Unit

Asserts that two elements are equal according to the Compare[A, B] type-class.

Asserts that two elements are equal according to the Compare[A, B] type-class.

By default, uses == to compare values.

Inherited from:
Assertions
def assertEqualsDouble(obtained: Double, expected: Double, delta: Double, clue: => Any)(implicit loc: Location): Unit

Asserts that two doubles are equal to within a positive delta. If the expected value is infinity then the delta value is ignored. NaNs are considered equal: assertEquals(Double.NaN, Double.NaN, *) passes.

Asserts that two doubles are equal to within a positive delta. If the expected value is infinity then the delta value is ignored. NaNs are considered equal: assertEquals(Double.NaN, Double.NaN, *) passes.

Inherited from:
Assertions
def assertEqualsFloat(obtained: Float, expected: Float, delta: Float, clue: => Any)(implicit loc: Location): Unit

Asserts that two floats are equal to within a positive delta. If the expected value is infinity then the delta value is ignored. NaNs are considered equal: assertEquals(Float.NaN, Float.NaN, *) passes.

Asserts that two floats are equal to within a positive delta. If the expected value is infinity then the delta value is ignored. NaNs are considered equal: assertEquals(Float.NaN, Float.NaN, *) passes.

Inherited from:
Assertions
def assertIO[A, B](obtained: IO[A], returns: B, clue: => Any)(implicit loc: Location, ev: B <:< A): IO[Unit]

Asserts that an IO returns an expected value.

Asserts that an IO returns an expected value.

The "returns" value (second argument) must have the same type or be a subtype of the one "contained" inside the IO (first argument). For example:

 assertIO(IO(Option(1)), returns = Some(1)) // OK
 assertIO(IO(Some(1)), returns = Option(1)) // Error: Option[Int] is not a subtype of Some[Int]

The "clue" value can be used to give extra information about the failure in case the assertion fails.

Value parameters:
clue

a value that will be printed in case the assertions fails

obtained

the IO under testing

returns

the expected value

Inherited from:
CatsEffectAssertions
def assertNoDiff(obtained: String, expected: String, clue: => Any)(implicit loc: Location): Unit
Inherited from:
Assertions
def assertNotEquals[A, B](obtained: A, expected: B, clue: => Any)(implicit loc: Location, compare: Compare[A, B]): Unit

Asserts that two elements are not equal according to the Compare[A, B] type-class.

Asserts that two elements are not equal according to the Compare[A, B] type-class.

By default, uses == to compare values.

Inherited from:
Assertions
def assertSyncIO[A, B](obtained: SyncIO[A], returns: B, clue: => Any)(implicit loc: Location, ev: B <:< A): SyncIO[Unit]

Asserts that a SyncIO returns an expected value.

Asserts that a SyncIO returns an expected value.

The "returns" value (second argument) must have the same type or be a subtype of the one "contained" inside the SyncIO (first argument). For example:

 assertSyncIO(SyncIO(Option(1)), returns = Some(1)) // OK
 assertSyncIO(SyncIO(Some(1)), returns = Option(1)) // Error: Option[Int] is not a subtype of Some[Int]

The "clue" value can be used to give extra information about the failure in case the assertion fails.

Value parameters:
clue

a value that will be printed in case the assertions fails

obtained

the SyncIO under testing

returns

the expected value

Inherited from:
CatsEffectAssertions
def assume(cond: Boolean, clue: => Any)(implicit loc: Location): Unit
Inherited from:
Assertions
def beforeAll(): Unit

Runs once before all test cases and before all suite-local fixtures are setup. An error in this method aborts the test suite.

Runs once before all test cases and before all suite-local fixtures are setup. An error in this method aborts the test suite.

Inherited from:
Suite
def beforeEach(context: BeforeEach): Unit

Runs before each individual test case. An error in this method aborts the test case.

Runs before each individual test case. An error in this method aborts the test case.

Inherited from:
Suite
def clue[T](c: Clue[T]): T
Inherited from:
Assertions
def clues(clue: Clue[_]*): Clues
Inherited from:
Assertions
inline def compileErrors(inline code: String): String
Inherited from:
CompileErrorMacro
def fail(message: String, clues: Clues)(implicit loc: Location): Nothing

Unconditionally fails this test with the given message and optional clues.

Unconditionally fails this test with the given message and optional clues.

Inherited from:
Assertions
def fail(message: String, cause: Throwable)(implicit loc: Location): Nothing

Unconditionally fails this test with the given message and exception marked as the cause.

Unconditionally fails this test with the given message and exception marked as the cause.

Inherited from:
Assertions
def failComparison(message: String, obtained: Any, expected: Any, clues: Clues)(implicit loc: Location): Nothing

Unconditionally fails this test due to result of comparing two values.

Unconditionally fails this test due to result of comparing two values.

The only reason to use this method instead of fail() is if you want to allow comparing the two different values in the the IntelliJ GUI diff viewer.

Inherited from:
Assertions
def failSuite(message: String, clues: Clues)(implicit loc: Location): Nothing

Unconditionally fail this test case and cancel all the subsequent tests in this suite.

Unconditionally fail this test case and cancel all the subsequent tests in this suite.

Inherited from:
Assertions
def intercept[T <: Throwable](body: => Any)(implicit T: ClassTag[T], loc: Location): T

Evalutes the given expression and asserts that an exception of type T is thrown.

Evalutes the given expression and asserts that an exception of type T is thrown.

Inherited from:
Assertions
def interceptIO[T <: Throwable](io: IO[Any])(implicit T: ClassTag[T], loc: Location): IO[T]

Intercepts a Throwable being thrown inside the provided IO.

Intercepts a Throwable being thrown inside the provided IO.

Example:
 val io = IO.raiseError[Unit](MyException("BOOM!"))
 interceptIO[MyException](io)

or

 interceptIO[MyException] {
     IO.raiseError[Unit](MyException("BOOM!"))
 }
Inherited from:
CatsEffectAssertions
def interceptMessage[T <: Throwable](expectedExceptionMessage: String)(body: => Any)(implicit T: ClassTag[T], loc: Location): T

Evalutes the given expression and asserts that an exception of type T with the expected message is thrown.

Evalutes the given expression and asserts that an exception of type T with the expected message is thrown.

Inherited from:
Assertions
def interceptMessageIO[T <: Throwable](expectedExceptionMessage: String)(io: IO[Any])(implicit T: ClassTag[T], loc: Location): IO[T]

Intercepts a Throwable with a certain message being thrown inside the provided IO.

Intercepts a Throwable with a certain message being thrown inside the provided IO.

Example:
 val io = IO.raiseError[Unit](MyException("BOOM!"))
 interceptIO[MyException]("BOOM!")(io)

or

 interceptIO[MyException] {
     IO.raiseError[Unit](MyException("BOOM!"))
 }
Inherited from:
CatsEffectAssertions
def interceptMessageSyncIO[T <: Throwable](expectedExceptionMessage: String)(io: SyncIO[Any])(implicit T: ClassTag[T], loc: Location): SyncIO[T]

Intercepts a Throwable with a certain message being thrown inside the provided SyncIO.

Intercepts a Throwable with a certain message being thrown inside the provided SyncIO.

Example:
 val io = SyncIO.raiseError[Unit](MyException("BOOM!"))
 interceptSyncIO[MyException]("BOOM!")(io)

or

 interceptSyncIO[MyException] {
     SyncIO.raiseError[Unit](MyException("BOOM!"))
 }
Inherited from:
CatsEffectAssertions
def interceptSyncIO[T <: Throwable](io: SyncIO[Any])(implicit T: ClassTag[T], loc: Location): SyncIO[T]

Intercepts a Throwable being thrown inside the provided SyncIO.

Intercepts a Throwable being thrown inside the provided SyncIO.

Example:
 val io = SyncIO.raiseError[Unit](MyException("BOOM!"))
 interceptSyncIO[MyException](io)

or

 interceptSyncIO[MyException] {
     SyncIO.raiseError[Unit](MyException("BOOM!"))
 }
Inherited from:
CatsEffectAssertions
def isCI: Boolean
Inherited from:
SuiteTransforms
def munitAnsiColors: Boolean
Inherited from:
Assertions
def munitCaptureClues[T](thunk: => T): (T, Clues)
Inherited from:
Assertions
Inherited from:
TestTransforms
def munitFixtures: Seq[AnyFixture[_]]

Fixtures that can be reused for individual test cases or entire suites.

Fixtures that can be reused for individual test cases or entire suites.

Inherited from:
Suite
def munitFlakyOK: Boolean
Inherited from:
TestTransforms
Inherited from:
TestTransforms
Inherited from:
ValueTransforms
def munitIOTimeout: Duration

The timeout for IO-based tests. When it expires it will gracefully cancel the fiber running the test and invoke any finalizers before ultimately failing the test.

The timeout for IO-based tests. When it expires it will gracefully cancel the fiber running the test and invoke any finalizers before ultimately failing the test.

Note that the fiber may still hang while running finalizers or even be uncancelable. In this case the munitTimeout will take effect, with the caveat that the hanging fiber will be leaked.

Inherited from:
CatsEffectSuite
def munitIgnore: Boolean
Inherited from:
SuiteTransforms
Inherited from:
SuiteTransforms
Inherited from:
SuiteTransforms
def munitPrint(clue: => Any): String
Inherited from:
Assertions
final def munitSuiteTransform(tests: List[Test]): List[Test]
Inherited from:
SuiteTransforms
Inherited from:
SuiteTransforms
final def munitTestTransform(test: Test): Test
Inherited from:
TestTransforms
Definition Classes
ScalaCheckSuite -> TestTransforms
Inherited from:
ScalaCheckSuite
def munitTests(): Seq[Test]
Inherited from:
BaseFunSuite
@deprecatedOverriding("Override munitIOTimeout instead. This method will not be finalized, but the only reason to".+("override it would be to adjust the grace period for fiber cancelation (default 1 second)."), "2.0.0")
override def munitTimeout: Duration

The overall timeout applicable to all tests in the suite, including those written in terms of Future or synchronous code. This is implemented by the MUnit framework itself.

The overall timeout applicable to all tests in the suite, including those written in terms of Future or synchronous code. This is implemented by the MUnit framework itself.

When this timeout expires, the suite will immediately fail the test and proceed without waiting for its cancelation or even attempting to cancel it. For that reason it is recommended to set this to a greater value than munitIOTimeout, which performs graceful cancelation of IO-based tests. The default grace period for cancelation is 1 second.

Definition Classes
CatsEffectSuite -> BaseFunSuite
Inherited from:
CatsEffectSuite
final def munitValueTransform(testValue: => Any): Future[Any]
Inherited from:
ValueTransforms
Definition Classes
CatsEffectSuite -> ValueTransforms
Inherited from:
CatsEffectSuite
def property(options: TestOptions)(body: => Prop)(implicit loc: Location): Unit
Inherited from:
ScalaCheckSuite
def property(name: String)(body: => Prop)(implicit loc: Location): Unit
Inherited from:
ScalaCheckSuite
protected def scalaCheckInitialSeed: String
Inherited from:
ScalaCheckSuite
protected def scalaCheckPrettyParameters: Params
Inherited from:
ScalaCheckSuite
protected def scalaCheckTestParameters: Parameters
Inherited from:
ScalaCheckSuite
def test(options: TestOptions)(body: => Any)(implicit loc: Location): Unit
Inherited from:
BaseFunSuite
def test(name: String)(body: => Any)(implicit loc: Location): Unit
Inherited from:
BaseFunSuite

Deprecated and Inherited methods

@deprecated("Use munitIORuntime", "2.0.0")
def munitIoRuntime: IORuntime
Deprecated
Inherited from:
CatsEffectSuite

Inherited fields

val munitLines: Lines
Inherited from:
Assertions
final val munitTestsBuffer: ListBuffer[Test]
Inherited from:
BaseFunSuite

Extensions

Extensions

extension (s: ShouldAction)
@targetName("inIO")
def in(body: => IO[Any])(using loc: Location): Unit
@targetName("inProp")
def in(body: => Prop)(using loc: Location): Unit
extension (thing: String)
def should(action: String): ShouldAction

Implicits

Inherited implicits

Inherited from:
CatsEffectAssertions
final implicit def MUnitCatsAssertionsForIOOps[A](io: IO[A]): MUnitCatsAssertionsForIOOps[A]
Inherited from:
CatsEffectAssertions
Inherited from:
CatsEffectAssertions
final implicit def MUnitCatsAssertionsForSyncIOOps[A](io: SyncIO[A]): MUnitCatsAssertionsForSyncIOOps[A]
Inherited from:
CatsEffectAssertions
Inherited from:
CatsEffectAssertions
final implicit def SyncIOFunFixtureOps[T](fixture: SyncIO[FunFixture[T]]): SyncIOFunFixtureOps[T]
Inherited from:
CatsEffectFunFixtures
implicit override def munitExecutionContext: ExecutionContext
Definition Classes
CatsEffectSuite -> Suite
Inherited from:
CatsEffectSuite
implicit def munitIORuntime: IORuntime
Inherited from:
CatsEffectSuite
implicit def testOptionsFromString(name: String)(implicit loc: Location): TestOptions

Implicitly create a TestOptions given a test name. This allows writing test("name") { ... } even if test accepts a TestOptions

Implicitly create a TestOptions given a test name. This allows writing test("name") { ... } even if test accepts a TestOptions

Inherited from:
TestOptionsConversions
implicit def unitToProp(unit: Unit): Prop
Inherited from:
ScalaCheckSuite