Created
July 2, 2020 17:25
-
-
Save dubzzz/82d0b4a1ed020ebdaf51e0625fd837bc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| miniFc.assert = property => { | |
| for (let runId = 0 ; runId !== 100 ; ++runId) { | |
| const seed = runId; | |
| const mrng = new Random(prand.xoroshiro128plus(seed)); | |
| const valueUnderTest = property.generate(mrng); | |
| if (!property.run(valueUnderTest)) { | |
| throw new Error(`Property failed after ${runId + 1} runs with value ${JSON.stringify(valueUnderTest)}`); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment