Skip to content

Instantly share code, notes, and snippets.

@nlacasse
Created October 26, 2010 19:44
Show Gist options
  • Select an option

  • Save nlacasse/647622 to your computer and use it in GitHub Desktop.

Select an option

Save nlacasse/647622 to your computer and use it in GitHub Desktop.
i can make this happen
var domTest = require('./lib/domtest');
var testDocumentExists = function (window) {
assert.notEqual(window.document, undefined);
};
var testJQueryVersion = function (versionString) {
return function (window) {
assert.notEqual(window.jQuery, undefined);
assert.strictEqual(window.jQuery.fn.jquery, versionString);
};
};
var testPageTitle = function (titleString) {
return function (window) {
assert.strictEqual(window.document.title, titleString);
};
};
domTest.runOn('http://www.google.com/', [
testDocumentExists,
testJQueryVersion('1.4.2'),
testPageTitle("Google")
]);
domTest.runOn('http://www.asdf.com/', [
testDocumentExists,
testJQueryVersion('1.4.2'),
testPageTitle("asdf")
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment