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

[io.js] Update jsdom and get jest working on io.js #374

Closed
wants to merge 2 commits into from

Commits on Jun 23, 2015

  1. [io.js] Update jsdom and get jest working on io.js

    This gets jest working on io.js 1.8.x and 2.0.x. io.js is reconciling with the Node Foundation so users who are still on Node are on the upgrade path that converges with io.js anyway. What this means is the jest version probably should be bumped to 0.5.0, where 0.4.x is a maintenance branch for legacy Node (typically with semver, a major version bump is required but 0.x.x releases are considered a free-for-all).
    
    This diff is near the minimal amount of work to bring jest up to date and pass all of its tests.
    
     - Upgraded npm dependencies. The major update is jsdom from 0.10.3 to 5.4.3. This lets us drop the indirect contextify dependency.
     - Removed harmonize, since io.js uses modern V8 and enables stable ES6 features by default
     - Removed the `--harmony` flag from the TestRunner for the same reason (trivia: i added that line once upon a time, let me delete it)
     - Replaced jsdom's `run` with io.js's built-in `vm` module
     - Added support for curried arguments in the fake `nextTick` implementation, which io.js itself relies on
     - Updated the HasteModuleLoader to handle Node built-in modules before `node_modules` -- this fixes an issue I was getting with graceful-fs trying to require smalloc.
     - Patched coffeescript to use Array.isArray instead of `instanceof Array`. Working on getting that merged upstream.
    
    Also mocked out JSDomEnvironment under __mocks__ instead of doing it in each test. Each test used to implement its own JSDomEnvironment. This diff removes the copy-pasted code and introduces a shared mock under __mocks__.
    
    Test Plan:
    ```
    nvm install iojs-1
    rm -fr node_modules && npm install
    
    nvm install iojs-2
    rm -fr node_modules && npm install
    ```
    ide committed Jun 23, 2015
    Configuration menu
    Copy the full SHA
    4506693 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    eb2eaee View commit details
    Browse the repository at this point in the history