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

Fix QUnit test #22

Closed
wants to merge 1 commit into from
Closed

Conversation

fcarstens
Copy link
Contributor

There is an interesting bug with QUnit at the moment. QUnit defines a module function which tricks our umd wrapper to believe that CommonJS is present. The workaround is to include the reporter before QUnit. I'm not really satisfied with that but I don't have a better solution. Any ideas?

@jzaefferer
Copy link
Member

I don't yet know where this line is coming from:

typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.JsReporters = factory();

It really should be checking for module.exports, not just module. Can we get that fixed instead?

@leobalter
Copy link
Member

If I'm not wrong, this is generated by esperanto or babel.

@csnover
Copy link

csnover commented Jul 27, 2015

Incidentally, changing that line to check for module.exports will probably cause different things to break if you load them into the browser-side of Electron, since it does not expose a global exports but does expose module and module.exports for the HTML file. :\

@fcarstens
Copy link
Contributor Author

The wrapper is generated by esperanto. Where do we want to fix this? I can try to work around this in the build process...

@jzaefferer
Copy link
Member

Look for open issues on the esperanto repo, if there is none, open one. Meanwhile we can try to work around it on our end.

@jzaefferer
Copy link
Member

@fcarstens have you looked into open esparanto issues or filing one yourself?

fcarstens added a commit to fcarstens/js-reporters that referenced this pull request Aug 21, 2015
@fcarstens fcarstens closed this Aug 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants