WIP: make mocha browser tests all run with no console errors

Work in progress. Don't pull this in.