ianb / doctestjs

Javascript testing made easy and explicit
http://ianb.github.io/doctestjs/
MIT License
142 stars 10 forks source link

Create Node.js nodeunit wrapper #35

Open ianb opened 12 years ago

ianb commented 12 years ago

It would be nice if you could make nodeunit-compatible tests from doctests. This might look like:

doctest = require('doctest');
exports.testDoctests = doctest.UnitTest('some_file.js');

This might be very simplistic, like just create a function that raises an exception when it fails. But it could also do something like explode tests into a suite.