Is it possible to check the validity of your JavaScript code, even modern techniques and JavaScript calls with some form of validity checker? I have seen some that check JavaScript but about with the combination of your HTML document, possibly with CSS, possibly 'src' include path, etc?
And what are the normal approaches for this type of testing?