ACtually, this might be better:

```js
var mochaConfig = {
  reporter: createMochaReporterConstructor(window.__karma__),
  ui: 'bdd',
  globals: ['__cov*']
};

if (window.__karma__.config && window.__karma__.config.mocha) {
  // copy all the properties (except reporter) from window.__karma__.mocha to mochaConfig
  // + the globals merging
}
```

This should work, as there's gonna be only references from the child frame to parent, not the other way around.