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

Support property based testing in Kyo-test #877

Closed
calvinlfer opened this issue Nov 29, 2024 · 1 comment · Fixed by #879
Closed

Support property based testing in Kyo-test #877

calvinlfer opened this issue Nov 29, 2024 · 1 comment · Fixed by #879
Labels

Comments

@calvinlfer
Copy link
Contributor

Currently Kyo-test only exposes running tests but does not support property based tests since the underlying library exposes ZIO when using check. This ticket is to improve the DX around property based tests

@hearnadam
Copy link
Collaborator

The issue is check returns a ZIO. We should replace check with something that returns a Kyo instead (or kyo-test could enable mixing Kyo and ZIO)...

As a temporary bypass, you can just use ZIOs.get

            suite("generators")(
                test("1")(
                    ZIOs.get:
                        check(Gen.int) { n =>
                            assertTrue(n == n)
                        }
                )
            )

hearnadam added a commit that referenced this issue Dec 1, 2024
- refactor methods to use `TestConstructor`/`CheckConstructor`
- mark `test`/`suite` as final
- mark `run` as protected

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

Successfully merging a pull request may close this issue.

2 participants