Ian Bicking has written a doctest for Javascript. This is exactly what I was looking for, so I’ve plugged it in and it’s working great so far — except that the docs have to be coded by hand. I guess the next stop is to port jsdoc-toolkit from Javascript/Rhino to Python, so I can auto-generate the docs.
There was small fix I had to make in order for doctestjs to read the tests appropriately because I’m sometimes sloppy in whether my files use Unix/Mac/Dos line termination. I replaced text.split(/\n/) with text.split(/(\r\n|\r|\n)/). (don’t you love reading regex? Wonder how long it’ll be before somebody ports pyparsing to JS…)
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.