aboutsummaryrefslogtreecommitdiffstats
path: root/test/data
diff options
context:
space:
mode:
authortimmywil <timmywillisn@gmail.com>2012-05-28 12:43:41 -0400
committertimmywil <timmywillisn@gmail.com>2012-05-28 12:43:41 -0400
commit3ee332b2382b858bb603f227f15a4212c01d9d69 (patch)
tree594bdcd4918f7a205d82902fb983d9d3fa4a8438 /test/data
parent519b225a5b65b6503abf7497a324480aa45e4db2 (diff)
downloadjquery-3ee332b2382b858bb603f227f15a4212c01d9d69.tar.gz
jquery-3ee332b2382b858bb603f227f15a4212c01d9d69.zip
Minor test suite adjustments
Diffstat (limited to 'test/data')
-rw-r--r--test/data/testinit.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/test/data/testinit.js b/test/data/testinit.js
index 9a27f5287..85765b75c 100644
--- a/test/data/testinit.js
+++ b/test/data/testinit.js
@@ -24,30 +24,34 @@ define.amd = {
* @result [<div id="main">, <span id="foo">, <input id="bar">]
*/
function q() {
- var r = [];
+ var r = [],
+ i = 0;
- for ( var i = 0; i < arguments.length; i++ ) {
+ for ( ; i < arguments.length; i++ ) {
r.push( document.getElementById( arguments[i] ) );
}
-
return r;
}
/**
* Asserts that a select matches the given IDs * @example t("Check for something", "//[a]", ["foo", "baar"]);
+ * @param {String} a - Assertion name
+ * @param {String} b - Sizzle selector
+ * @param {String} c - Array of ids to construct what is expected
* @result returns true if "//[a]" return two elements with the IDs 'foo' and 'baar'
*/
-function t(a,b,c) {
- var f = jQuery(b).get(), s = "";
+function t( a, b, c ) {
+ var f = jQuery(b).get(),
+ s = "",
+ i = 0;
- for ( var i = 0; i < f.length; i++ ) {
- s += (s && ",") + '"' + f[i].id + '"';
+ for ( ; i < f.length; i++ ) {
+ s += ( s && "," ) + '"' + f[ i ].id + '"';
}
- deepEqual(f, q.apply(q,c), a + " (" + b + ")");
+ deepEqual(f, q.apply( q, c ), a + " (" + b + ")");
}
-
var createDashboardXML = function() {
var string = '<?xml version="1.0" encoding="UTF-8"?> \
<dashboard> \