typelevel / typelevel/cats-effect-testing
Scalatest: Support use of fixture contexts
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 194
- Forks
- 42
- Avg merge
- 5h 16m
- Merged PRs (30d)
- 1
Description
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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Scalatest integration and the fixture-context examples shown in the issue, then trace how the library identifies tests returning IO[_]. Determine whether fixture contexts can remain in use while the effectful test is still evaluated. Done means a documented, working approach for the shown TestFixture with OtherTestFixture pattern.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100