https://github.com/purescript-spec/purescript-spec-quickcheck
Adapter between purescript-spec and purescript-quickcheck
https://github.com/purescript-spec/purescript-spec-quickcheck
Last synced: 2 months ago
JSON representation
Adapter between purescript-spec and purescript-quickcheck
- Host: GitHub
- URL: https://github.com/purescript-spec/purescript-spec-quickcheck
- Owner: purescript-spec
- License: mit
- Created: 2015-05-12T05:09:27.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2024-07-20T21:40:34.000Z (almost 2 years ago)
- Last Synced: 2026-02-15T14:24:36.597Z (2 months ago)
- Language: PureScript
- Homepage:
- Size: 89.8 KB
- Stars: 13
- Watchers: 4
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# purescript-spec-quickcheck
purescript-spec-quickcheck is a tiny adapter between the
[purescript-spec](https://github.com/purescript-spec/purescript-spec) test framework
and [purescript-quickcheck](https://github.com/purescript/purescript-quickcheck).
## Usage
```bash
bower install purescript-spec-quickcheck
```
```purescript
module Test.Main where
import Prelude
import Effect (Effect)
import Test.QuickCheck ((===), (/==))
import Test.Spec (describe, it)
import Test.Spec.QuickCheck (quickCheck)
import Test.Spec.Reporter.Console (consoleReporter)
import Test.Spec.Runner (runSpec)
main :: Effect Unit
main = runSpec [consoleReporter] do
describe "Math" do
it "works" $
quickCheck \n -> (n * 2 / 2) === n
it "works again" $
quickCheck \n -> ((n + 1) * 2) /== n
```
## API Docs
This module is published, and has its API documentation, [on
Pursuit](https://pursuit.purescript.org/packages/purescript-spec-quickcheck).
## Contribute
If you have any issues or possible improvements please file them as
[GitHub Issues](https://github.com/purescript-spec/purescript-spec-quickcheck/issues).
Pull requests are encouraged.
## License
[MIT License](LICENSE.md).