I've been working on a medium sized web application that makes very heavy use of javascript.  I tend to introduce common errors per 10 lines of code with either an unknown variable name or function name from another module\namespace or forgetting a return and other common errors.I'm noticing I'm getting quite a lot of feedback in fixing these errors as a side effect of my qunit testing.  Is unit testing a typical way to make up for a compiler in dynamic languages?
In javascript and other languages which lack a compiler, is unit testing a good method to ensure correct syntax and variable naming?
javascript;unit testing;dynamic typing
First of all I would run JSLint over your code religiously. you should be able to get your editor or IDE to do it for you, use Flymake mode in Emacs. That will catch things like typos when you miss type a variable name. Having good tests will also of course help. I have used qUnit to write tests in Javascript and have been pretty happy with it. Jasmine also is supposed to be pretty good. As an aside this has to do with dynamic typing not a lack of a compiler, there are a number of languages that are compiled but are still weekly typed (Scheme and Erlang come to mind)