@@ -24,30 +24,34 @@ define.amd = {
24
24
* @result [<div id="main">, <span id="foo">, <input id="bar">]
25
25
*/
26
26
function q ( ) {
27
- var r = [ ] ;
27
+ var r = [ ] ,
28
+ i = 0 ;
28
29
29
- for ( var i = 0 ; i < arguments . length ; i ++ ) {
30
+ for ( ; i < arguments . length ; i ++ ) {
30
31
r . push ( document . getElementById ( arguments [ i ] ) ) ;
31
32
}
32
-
33
33
return r ;
34
34
}
35
35
36
36
/**
37
37
* Asserts that a select matches the given IDs * @example t("Check for something", "//[a]", ["foo", "baar"]);
38
+ * @param {String } a - Assertion name
39
+ * @param {String } b - Sizzle selector
40
+ * @param {String } c - Array of ids to construct what is expected
38
41
* @result returns true if "//[a]" return two elements with the IDs 'foo' and 'baar'
39
42
*/
40
- function t ( a , b , c ) {
41
- var f = jQuery ( b ) . get ( ) , s = "" ;
43
+ function t ( a , b , c ) {
44
+ var f = jQuery ( b ) . get ( ) ,
45
+ s = "" ,
46
+ i = 0 ;
42
47
43
- for ( var i = 0 ; i < f . length ; i ++ ) {
44
- s += ( s && "," ) + '"' + f [ i ] . id + '"' ;
48
+ for ( ; i < f . length ; i ++ ) {
49
+ s += ( s && "," ) + '"' + f [ i ] . id + '"' ;
45
50
}
46
51
47
- deepEqual ( f , q . apply ( q , c ) , a + " (" + b + ")" ) ;
52
+ deepEqual ( f , q . apply ( q , c ) , a + " (" + b + ")" ) ;
48
53
}
49
54
50
-
51
55
var createDashboardXML = function ( ) {
52
56
var string = '<?xml version="1.0" encoding="UTF-8"?> \
53
57
<dashboard> \
0 commit comments