Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scalatest: Support use of fixture contexts #590

Open
henricook opened this issue Sep 23, 2024 · 0 comments
Open

Scalatest: Support use of fixture contexts #590

henricook opened this issue Sep 23, 2024 · 0 comments

Comments

@henricook
Copy link

henricook commented Sep 23, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant