diff --git a/browser-entry.js b/browser-entry.js index cdcb56b6fb..dee3789231 100644 --- a/browser-entry.js +++ b/browser-entry.js @@ -210,8 +210,8 @@ Mocha.process = process; * Expose mocha. */ -mocha.Mocha = Mocha; -mocha.mocha = mocha; +global.Mocha = Mocha; +global.mocha = mocha; // this allows test/acceptance/required-tokens.js to pass; thus, // you can now do `const describe = require('mocha').describe` in a diff --git a/rollup.config.js b/rollup.config.js index d475c477a9..4b4f3494e4 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -17,8 +17,7 @@ const config = { file: './mocha.js', format: 'umd', sourcemap: true, - name: 'mocha', - footer: 'window.Mocha = window.mocha.Mocha;' + name: 'mocha' }, plugins: [ json(),