Dr Nic’s TDD for Greasemonkey scripts; and introducing Ninja Search JS:
But what stops me writing more of them is that once you cobble together a script, you push it out into the wild and then bug reports start coming back. Or feature requests, preferably. I’d now have a code base without any test coverage, so each new change is likely to break something else. Its also difficult to isolate bugs across different browsers, or in different environments (running Ninja Search JS in a page that used prototypejs originally failed), without a test suite.
Full article:
http://drnicwilliams.com/2009/06/07/tdd-for-greasemonkey-...