thlorenz / browserify-shim

📩 Makes CommonJS incompatible files browserifyable.
MIT License
933 stars 87 forks source link

Make tests iojs only #166

Closed bendrucker closed 9 years ago

bendrucker commented 9 years ago

Did some investigating on #163. The problem is that jsdom requires iojs as of v4 (for changes to V8/vm). As far as I can tell there's no jsdom that's compatible with 0.10, 0.12, and iojs. Short of spinning up a real browser and totally rewriting the test suite, we have a choice to make here.

  1. Leave things as is and advertise that tests are 0.10 only. The rationale would be that there are less likely to be relevant breaking changes in 0.12/iojs that would pass 0.10 tests. The reverse is not as true (e.g. you could use path.isAbsolute and unknowingly break 0.10).
  2. Go iojs only on tests and just pay attention to not using 0.10 incompatible methods. Since the last code-level contribution not by the two of us was in January '14, this should be easily doable.
  3. Add code to the tests to downgrade jsdom and use the older API on 0.10 so we can still run the tests.

My preference is for 2 since b-shim is a relatively low velocity project and it's a build tool. But I'm willing to implement 3 for the best of both worlds. My thought here is that we're both on io and out of all test suite runs we probably represent the vast majority.

thlorenz commented 9 years ago

2 is fine. Looks like you already took care of that. Please merge to master, a publish won't be necessary at this point.