https://github.com/yamadapc/node-for-all
A simple forAll implementation in node.js. Based on node-quickcheck.
https://github.com/yamadapc/node-for-all
Last synced: 10 days ago
JSON representation
A simple forAll implementation in node.js. Based on node-quickcheck.
- Host: GitHub
- URL: https://github.com/yamadapc/node-for-all
- Owner: yamadapc
- License: mit
- Created: 2014-05-18T19:00:59.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-02-26T15:01:58.000Z (about 9 years ago)
- Last Synced: 2025-04-25T16:46:52.793Z (29 days ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
for-all
=======A simple forAll implementation in node.js. Based on node-quickcheck.
## Installing
Install with `npm install for-all`.
## Usage
```javascript
var forAll = require('for-all');
var chance = new (require('chance'))();
var add1 = function(x) { return x + 1; }forAll(add1, function(ret, args) {
return args[0] < ret;
}, [chance.integer.bind(chance)]);
```## forAll(fn, property generators)
Checks if a property stands against a number of value generators through 100
iterations.### Params:
* **Function** *fn* The function to test.
* **Function** *property* A property to test over generated values.
* **Array.** *[generators]* Value generators, to be fed in order into## License
Copyright (c) 2014 Pedro Tacla Yamada. Licensed under the MIT license.
Please refer to the [LICENSE](LICENSE) file for more info.## Donations
Would you like to buy me a beer? Send bitcoin to 3JjxJydvoJjTrhLL86LGMc8cNB16pTAF3y