-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Stop iterating over window props #4745
Comments
Yes, I have seen this warning Are you bundling yourself, or do you use our browser bundle mocha.js or mocha-es2018.js? |
I'm using Is it necessary to iterate the window props when there's no need to check their leaks? |
If the |
A quick dirty fix: Line 219 in 4860738
to [
'Mocha',
'after',
'afterEach',
'before',
'beforeEach',
'context',
'describe',
'it',
'mocha',
'run',
'setup',
'specify',
'suite',
'suiteSetup',
'suiteTeardown',
'teardown',
'test',
'xcontext',
'xdescribe',
'xit',
'xspecify'
].forEach(function(key) {
mocha[key] = global[key];
});
module.exports = mocha; |
probably related issue #4740 |
Prerequisites
faq
labelnode node_modules/.bin/mocha --version
(Local) andmocha --version
(Global). We recommend that you not install Mocha globally.Description
mocha/browser-entry.js
Line 219 in 4860738
is causing chrome to show a
'window.webkitStorageInfo' is deprecated.
warning.To my understanding, iterating over the window properties is only for thecheck-leaks
feature. Then with this feature disabled, there is no need to iterate that.There is no need to access all the global variables.
Thank you.
Steps to Reproduce
Run any mocha test in a recent Chrome.
Expected behavior: No access to every global variables.
Actual behavior: At least one access to each global variable.
Reproduces how often: Every time you run mocha.
Versions
mocha --version
andnode node_modules/.bin/mocha --version
: 9.1.0node --version
: 14.17.0Additional Information
The text was updated successfully, but these errors were encountered: