-
-
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
Support for environment with global
and window
#1159
Conversation
Node-webkit has a global `global` object, while the global `this` is the `window` object. Overwriting `global` with `window` breaks a lot of things.
Unfortunately I couldn't find a way of adding a test for this change. In fact, no-matter what I did to |
There is more information regarding the reason for this change at intelligentgolf/karma-nodewebkit-launcher#15 |
👍 |
2 similar comments
+1 |
+1 |
Looks good to me, @markelog do you foresee this breaking anything? |
+1 here. This is a barrier to using Mocha to test node-webkit apps. |
Support for environment with `global` and `window`
Sorry for not responding right away, i'm on vacation this week |
No problem, was only interested in your opinion. Did some extra testing myself and concluded it was good to go. 😄 |
- grunt -> 1 - grunt-contrib-watch -> 1 - mocha -> 5 - in common.js: define "global" , see mochajs/mocha#1159 - in builtins.js: revert "console.log" to old value just after using the mock (in log-helper tests), because mocha calls "console.log" on failure, before "afterEach"
- grunt -> 1 - grunt-contrib-watch -> 1 - mocha -> 5 - in common.js: define "global" , see mochajs/mocha#1159 - in builtins.js: revert "console.log" to old value just after using the mock (in log-helper tests), because mocha calls "console.log" on failure, before "afterEach"
Node-webkit has a global
global
object, while the globalthis
is thewindow
object. Overwritingglobal
withwindow
breaks a lot ofthings.