These allow elm-check to rely on elm-test's runners, by converting the results of property-based checks to passing or failing. This means less duplicated work writing runners, and allows for property-based and unit testing to be used easily in the same test suite.
Previously, I had written a function to take the output of elm-check and turn it into tests, by assert True and assert False. This "worked", in that you could read the output, but it was cluttered with extra information on the ends of the lines:
With these new functions, and a bit of cleverness in the elm-check to elm-test conversion function, tests now look like this:
I'd like to go further and add "passed n checks" on the end, but that's more invasive, so I'll start with this.
This branch is based on taskrunner since I see that's where recent development is. Also, +1 for dropping 0.15 support in elm-package.json. I also cleaned up a few things I came across exploring the codebase. Releasing these changes will be a minor version bump.
These allow elm-check to rely on elm-test's runners, by converting the results of property-based checks to passing or failing. This means less duplicated work writing runners, and allows for property-based and unit testing to be used easily in the same test suite.
Previously, I had written a function to take the output of elm-check and turn it into tests, by
assert True
andassert False
. This "worked", in that you could read the output, but it was cluttered with extra information on the ends of the lines:With these new functions, and a bit of cleverness in the elm-check to elm-test conversion function, tests now look like this:
I'd like to go further and add "passed n checks" on the end, but that's more invasive, so I'll start with this.
This branch is based on
taskrunner
since I see that's where recent development is. Also, +1 for dropping 0.15 support inelm-package.json
. I also cleaned up a few things I came across exploring the codebase. Releasing these changes will be a minor version bump.