Code Monkey home page Code Monkey logo

qc.js's Introduction

qc.js
=====
This is a JavaScript implementation.
This fork is mainly a resort and over time it became a partly refactored
qc.js and provides a little more understandable structure imho.
It can run on node.js and in the browser by building it using the
build tools in the tools directory.

What is qc.js
=============
I have collected a couple of links right here:
http://delicious.com/wolframkriesing/quickcheck
QuickCheck comes from Haskell and allows for thourough testing using
random values and applying strategies to find the smallest failing
test cases. A test case just takes a number of generators, that
specify what kind of values are given to the test function, not the
values themselves but functions to generate the values. The easiest
is a random number, which means you can test your code using this
number and define the according expectation. Every test run generates
more and more different values the test is executed with.





Old documentation, from the original qc.js, where this is forked off.

JS Quickcheck Features
======================

- Listener UI's for Firebug, Firebug Lite (cross browser), and Rhino 
- Arbitrary generators are objects with fields arb and shrink (to add
  shrinking support later. The field shrink is optional and interpreted as 'null' if not present).
- Nice stable of generators available out of the box.
- arbArray to generate an arbitrary JS array.
- arbSelect to uniformly select one of the given generators
- arbNull which will always return 'null'
- arbNullOr generator returning null or the given generators return
  value (probability for null is 0.1)
- implemented 'classify' and 'collect' (see selfcheck.js for example)
- implemented simple shrinking strategies for primitive types
- arbArray has an optional second parameter setting its shrinking strategy 
- runrhino.js to tests so one can run selfcheck from command line by
  'rhino runrhino.js'
- implemented expectException property modifier

TODO:
=====
- start some kind of documentation

Build Documentation:
====================

In order to build the documentation you will need:

- jsdoc toolkit (http://code.google.com/p/jsdoc-toolkit/). 
  It is recommended to set the JSDOCDIR environment variable

- jsdoc simple template (http://github.com/urso/jsdoc-simple):
  just copy 'jsdoc-simple' directory to jsdoc toolkit's template directory

- run './mkdoc' shell command (needs *nix shell).


qc.js was originally written by Darrin Thompson with extensive contributions
from Steffen Siering.

qc.js's People

Contributors

urso avatar darrint avatar seidtgeist avatar

Watchers

Greg Weber avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.