+1
-1
| { | ||
| "name": "fast-spec", | ||
| "version": "0.0.2", | ||
| "version": "0.0.3", | ||
| "description": "Discover laws in your code like with QuickSpec", | ||
@@ -5,0 +5,0 @@ "main": "lib/fast-spec.js", |
+7
-3
@@ -15,10 +15,12 @@ # fast-spec | ||
| ```ts | ||
| ```js | ||
| import * as fc from "fast-check"; | ||
| import { funcDef, instDef, varDef, findSpecs } from "fast-spec"; | ||
| // const fc = require("fast-check"); | ||
| // const { funcDef, instDef, varDef, findSpecs } = require("fast-spec"); | ||
| findSpecs([ | ||
| // declare functions to be considered | ||
| funcDef("concat", 2, (a: any[], b: any[]) => [...a, ...b]), | ||
| funcDef("reverse", 1, (a: any[]) => [...a].reverse()), | ||
| funcDef("concat", 2, (a, b) => [...a, ...b]), | ||
| funcDef("reverse", 1, (a) => [...a].reverse()), | ||
| // declare basic root values (of special interest) | ||
@@ -47,1 +49,3 @@ instDef("[]", []), | ||
| - ... | ||
| *Live example available at https://runkit.com/dubzzz/hello-world-fast-spec* |
239525
0.07%49
6.52%