Using JSCheck in QUnit
If you're writing combinatorial logic, such as scheduling, or other search or constraint satisfaction problems, you may find property based testing useful. At least you should end up saner than trying to write unit tests for every combination yourself. You might even like to use it to exercise other functions you've written.
We're using qunit for testing (because of the ember integration) but this should be portable to other frameworks; there's not a lot of code.
https://github.com/nruth/qunit-jscheck
Results in teaspoon, showing only failing cases + summary of JSCheck run
Written by Nicholas Rutherford
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Tags
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#