Skip to content

Instantly share code, notes, and snippets.

@jasmith79
Created April 12, 2016 16:18
Show Gist options
  • Save jasmith79/09767f7683a489c74a47814d37cd3f64 to your computer and use it in GitHub Desktop.
Save jasmith79/09767f7683a489c74a47814d37cd3f64 to your computer and use it in GitHub Desktop.
How to run jQuery against promises A+ test suite in nodejs
var tester = require('promises-aplus-tests');
var jq = require('jquery');
var jsdom = require('jsdom');
jsdom.env('<p></p>', function(err, window) {
if (err != null) {
throw err;
} else {
var $ = jq(window);
var arg = {
deferred: $.Deferred
};
tester(arg, function(err) {
if (err) {
console.log(err);
}
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment