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

Support for environment with global and window #1159

Merged
merged 1 commit into from
Jul 14, 2014
Merged

Support for environment with global and window #1159

merged 1 commit into from
Jul 14, 2014

Conversation

michalc
Copy link

@michalc michalc commented Mar 16, 2014

Node-webkit has a global global object, while the global this is the
window object. Overwriting global with window breaks a lot of
things.

Node-webkit has a global `global` object, while the global `this` is the
`window` object. Overwriting `global` with `window` breaks a lot of
things.
@michalc
Copy link
Author

michalc commented Mar 16, 2014

Unfortunately I couldn't find a way of adding a test for this change. In fact, no-matter what I did to tail.js, including syntax errors, wouldn't make any tests I could run fail.

@michalc
Copy link
Author

michalc commented Mar 16, 2014

There is more information regarding the reason for this change at intelligentgolf/karma-nodewebkit-launcher#15

@MiLk
Copy link

MiLk commented Mar 17, 2014

👍

2 similar comments
@iwege
Copy link

iwege commented Jul 3, 2014

+1

@junxi
Copy link

junxi commented Jul 3, 2014

+1

@jbnicolai
Copy link

Looks good to me, @markelog do you foresee this breaking anything?

@boneskull
Copy link
Member

+1 here. This is a barrier to using Mocha to test node-webkit apps.

jbnicolai pushed a commit that referenced this pull request Jul 14, 2014
Support for environment with `global` and `window`
@jbnicolai jbnicolai merged commit d8157d0 into mochajs:master Jul 14, 2014
@markelog
Copy link

Looks good to me, @markelog do you foresee this breaking anything?

Sorry for not responding right away, i'm on vacation this week

@jbnicolai
Copy link

No problem, was only interested in your opinion. Did some extra testing myself and concluded it was good to go. 😄

nknapp added a commit to handlebars-lang/handlebars.js that referenced this pull request Sep 3, 2018
 - 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"
nknapp added a commit to handlebars-lang/handlebars.js that referenced this pull request Sep 4, 2018
 - 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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants