/JSTester

Two small applications that enable doctest-like testing for javascript.

Primary LanguageJavaScript

JSTester

Two handy applications that can help testing your javascript code.

Web application

Small webapplication that enables to generate a script for doctest-like testing for javascript

Usage:

  • Go to the webapplication link
  • Paste the doctest code
  • Click GO
  • Optionally: click MINIFY (get it all on 1 line, much cleaner.)
  • Paste code in js script
  • Run and see

Example functions:

functions

Example doctest:

functions

Example JSTest outcome:

functions

Example after running:

functions

Contributor

Javascript script

Javascript script to test doctests (considering errors, classes, code flow)

Usage:

Your code should look like this:

  • The code itself
  • The doctests, in the format as shown below (the quotes are important)
  • The doctest.txt script

Example code: code Example output: output

Contributor