Skip to content

Commit 21a52f0

Browse files
committed
Add a reference to node-quickcheck in JS
Fixes #25
1 parent 3b5a5d1 commit 21a52f0

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

rules/0260-JavaScript.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,22 @@ var assertFuzzyEquals = function(actual, expected, msg){
4747

4848
### Random tests
4949

50-
Unlike Haskell, JavaScript doesn't provide an automatic framework like
51-
QuickCheck, although there is an [implementation for
52-
node](https://github.com/mcandre/node-quickcheck). Until the Codewars
53-
platform provides an built-in way, you can use the following functions to
54-
create random tests in JavaScript.
55-
56-
Note that both expect your solution to be pure (don't change the argument,
57-
for example if it's an object or an array) and cannot check side-effects,
58-
so you probably edit the functions for your needs. Also note that
59-
`randomAssertSimilar` is rather verbose.
60-
61-
`generator` should return an array.
50+
In [August 2015][gitter-chat-quickcheck] the [`node-quickeck`][node-quickeck]
51+
package was added to the available JavaScript packages. This section predates
52+
the inclusion of the package. If you want to use `node-quickcheck`, have a
53+
look at it's documentation. If you prefer to write your random tests by hand,
54+
read on.
55+
56+
[gitter-chat-quickcheck]: https://gitter.im/Codewars/codewars.com?at=55d376c5bdd5d6c9362b6e79
57+
[node-quickeck]: https://github.com/mcandre/node-quickcheck
58+
59+
The following functions can be used for random tests. Note that both expect
60+
your solution to be pure (don't change the argument, for example if it's an
61+
object or an array) and cannot check side-effects, so you probably edit the
62+
functions for your needs. Also note that `randomAssertSimilar` is rather
63+
verbose.
64+
65+
In both functions, `generator` should return an array.
6266

6367
**NOTE:** The functions haven't been tested thoroughly. Use them with care
6468
and feel free to create an issue or a pull-request if they contain any errors.

0 commit comments

Comments
 (0)