forked from jeresig/env-js
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this commit adds support for the rhino debugger. if you want to run t…
…ests just use bin/test-jquery or bin/test-jquery (version). if you want to run the debugger do bin/test-jquery -d 1.3.2
- Loading branch information
thatcher
committed
May 15, 2009
1 parent
dabdc17
commit 6210191
Showing
4 changed files
with
835 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
// Init | ||
//debugger; | ||
load("build/runtest/env.js"); | ||
|
||
var isLocal; | ||
window.onload = function(){ | ||
isLocal = !!(window.location.protocol == 'file:'); | ||
(function($env){ | ||
|
||
// Load the test runner | ||
load("dist/jquery.js", | ||
"build/runtest/testrunner.js"); | ||
//let it load the script from the html | ||
$env.scriptTypes = { | ||
"text/javascript" :true | ||
}; | ||
|
||
// Load the tests | ||
load( | ||
"test/unit/core.js", | ||
"test/unit/selector.js", | ||
"test/unit/event.js", | ||
"test/unit/fx.js", | ||
"test/unit/dimensions.js", | ||
"test/unit/data.js", | ||
|
||
// offset relies on window.open, which is currently unimplemented in env.js | ||
//"test/unit/offset.js", | ||
var count = 0; | ||
window.log = function(result, message){ | ||
$env.log('(' + (count++) + ')[' + ((!!result) ? 'PASS' : 'FAIL') + '] ' + message); | ||
}; | ||
|
||
window.onload = function(){ | ||
$env.warn('Defining QUnit.done'); | ||
QUnit.done = function(pass, fail){ | ||
$env.warn('Writing Results to File'); | ||
jQuery('script').each(function(){ | ||
this.type = 'text/envjs'; | ||
}); | ||
$env.writeToFile( | ||
document.documentElement.xml, | ||
$env.location('jqenv.html') | ||
); | ||
}; | ||
|
||
// these tests require hitting a server, so we will need some clever env.js | ||
// way of testing them | ||
"test/unit/ajax.js" | ||
); | ||
} | ||
|
||
// Display the results | ||
results(); | ||
}; | ||
|
||
window.location = "test/index.html"; | ||
window.location = "test/index.html"; | ||
|
||
})(__env__); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.