Should be:

```js
if (window.mochaPhantomJS) {
  mochaPhantomJS.run();
} else {
  mocha.run();
}
```