Fix QUnit test #22

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
@fcarstens
Contributor

fcarstens commented Jul 26, 2015

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

This comment has been minimized.

Show comment
Hide comment
@jzaefferer

jzaefferer Jul 27, 2015

Contributor

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?

Contributor

jzaefferer commented Jul 27, 2015

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

This comment has been minimized.

Show comment
Hide comment
@leobalter

leobalter Jul 27, 2015

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

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

@csnover

This comment has been minimized.

Show comment
Hide comment
@csnover

csnover 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. :\

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

This comment has been minimized.

Show comment
Hide comment
@fcarstens

fcarstens Jul 29, 2015

Contributor

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

Contributor

fcarstens commented Jul 29, 2015

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

This comment has been minimized.

Show comment
Hide comment
@jzaefferer

jzaefferer Jul 30, 2015

Contributor

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.

Contributor

jzaefferer commented Jul 30, 2015

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

This comment has been minimized.

Show comment
Hide comment
@jzaefferer

jzaefferer Aug 13, 2015

Contributor

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

Contributor

jzaefferer commented Aug 13, 2015

@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