Last active
March 7, 2019 15:54
-
-
Save gunar/4b0e446d4a572fdfb253a02cda2f3d69 to your computer and use it in GitHub Desktop.
Property-based Testing example (pseudo-code).
This file contains 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
// Property-based Testing example (pseudo-code). | |
test([Number], anArrayOfNumbers => { | |
// ↑↑↑↑↑↑↑↑↑↑ ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ | |
// The schema. The generated test-data. | |
assert.deepEqual( | |
mySort([anArrayOfNumbers]), | |
Array.prototype.sort.call(anArrayOfNumbers) | |
) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment