You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we take the plunge of forking browserify, then a lot of things become possible. A proper mocking system would be relatively easy to implement if we could redefine browserify's implementation of require.
But I don't think we have to fork browserify. Instead, it looks like we can transform our own source files during testing so that require("mock-modules") can manipulate their module.exports, swapping a mocked version of exports in and out as necessary. We can do this either in bin/jsx or using a browserify source transform. I prefer bin/jsx because then, in principle at least, mocking would work with any module packaging tool (i.e. it would not depend on the browserify interface).
Need to investigate further, but I think this is really promising.
Activity
petehunt commentedon Jul 3, 2013
OK, the tests passed internally but not in open-source because dumpCache() is a no-op, so double DOM property injection is happening and throwing.
benjamn commentedon Jul 3, 2013
I have ideas.
If we take the plunge of forking browserify, then a lot of things become possible. A proper mocking system would be relatively easy to implement if we could redefine browserify's implementation of
require.But I don't think we have to fork browserify. Instead, it looks like we can transform our own source files during testing so that
require("mock-modules")can manipulate theirmodule.exports, swapping a mocked version ofexportsin and out as necessary. We can do this either inbin/jsxor using a browserify source transform. I preferbin/jsxbecause then, in principle at least, mocking would work with any module packaging tool (i.e. it would not depend on the browserify interface).Need to investigate further, but I think this is really promising.
Merge pull request react#154 from gaearon/resize-hilite
Merge pull request react#154 from gaearon/resize-hilite