Ian Bicking: the old part of his blog

Javascript Doctest

Since I'm thinking about writing a Javascript Logo, I decided I needed a good test framework. I was happy with my hack to use Python's doctest for testing Logo, so I thought I'd try to use doctest style testing in this project too.

I haven't started on the Logo part yet, but I did write a Javascript doctest runner. It uses MochiKit, located at http://svn.colorstudy.com/doctestjs/trunk/ -- but more interesting is the demo.

Python has oodles of different ways to do testing; but if there was one kind of testing I'd want to port to other systems from that the diversity of projects, it'd be doctest. Especially for an environment like Javascript where the lightness of the system is more important than organization. So I'm fairly pleased with how this feels so far, even though I haven't yet used it much.

Created 15 Apr '06
Modified 18 Apr '06

Comments:

You can see Kay's Javascript Logo wiki here.
# anonymous

"...but if there was one kind of testing I'd take away from that diversity of projects, it'd be doctest."

That sounds like you want to eliminate doctest from Python's list of available testing modules. I had to re-read that phrase three times before I realized what you really meant: doctest is unique and special among Python testing libraries.

# Daniel

yeah, that was confusion, I edited it to clarify

# Ian Bicking