Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build UMD bundle and polyfill language features #4366

Merged
merged 12 commits into from Jul 28, 2020
5 changes: 0 additions & 5 deletions .eslintrc.yml
Expand Up @@ -15,11 +15,6 @@ rules:
strict:
- error
- safe
# disallow Object.assign
no-restricted-properties:
- error
- object: 'Object'
property: 'assign'
overrides:
- files:
- 'docs/js/**/*.js'
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -49,7 +49,7 @@ jobs:
node_js: '10'
name: 'Node.js v10'

- script: npm start test.bundle test.browser
- script: npm start test.browser
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test.bundle becomes test.browser.requirejs

name: 'Browser'
node_js: 12
install: npm ci # we need the native modules here
Expand Down
6 changes: 3 additions & 3 deletions browser-entry.js
Expand Up @@ -210,10 +210,10 @@ Mocha.process = process;
* Expose mocha.
*/

global.Mocha = Mocha;
global.mocha = mocha;
mocha.Mocha = Mocha;
mocha.mocha = mocha;

// this allows test/acceptance/required-tokens.js to pass; thus,
// you can now do `const describe = require('mocha').describe` in a
// browser context (assuming browserification). should fix #880
module.exports = global;
module.exports = Object.assign(mocha, global);