fix exception in insight mocha browser tests

The Insight tests were actually broken and not running due to trying to access the nonexistent process variable. You could see the exception in the browser console. The proper way to check for this is to see if its type is undefined before trying to access it.