Skip to content

Instantly share code, notes, and snippets.

@cowboy
Created February 3, 2012 17:10
Show Gist options
  • Save cowboy/1731198 to your computer and use it in GitHub Desktop.
Save cowboy/1731198 to your computer and use it in GitHub Desktop.
You can run jQuery's unit tests in grunt!

First, install grunt v0.2.14 (or newer) via npm with npm install -g grunt, if you haven't already done so.

Next, install PhantomJS. If you're on OS X, use homebrew and brew install phantomjs. If you're on Windows or Linux, download from www.phantomjs.org and put it in your path.

Finally, just open a terminal and...

git clone https://github.com/jquery/jquery
cd jquery
git submodule update --init
git checkout 1.7.1
echo "config.init({qunit:{index:['test/index.html']}});" > grunt.js
grunt qunit

(I only get 37 errors here, pretty impressive for a headless browser)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment