Skip to content

Scalatest: Support use of fixture contexts #590

@henricook

Description

@henricook

I can't imagine a way that this can work but thought I'd post a feature request to see if bigger brains than mine can come up with anything.

I wrote a great PoC with cats-effect-testing with a test like:

"foo" in IO { 
   "stuff"
}: IO[String]

The problem is in reality most of our tests use Fixture Contexts to mix in fixture data, so would look like:

"foo" in new TestFixture with OtherTestFixture { 
  IO {
   "stuff"
  } 
}: TestFixture with OtherTestFixture

The problem of course is : TestFixture with OtherTestFixture which means the test doesn't return an IO[_] which means the library can't evaluate it.

I can't think of a way to both keep the use of fixture contexts to minimise change, but also be able to have tests that must be effectful (i.e. Acceptance/E2E tests)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions