Skip to content

Commit 3ee332b

Browse files
committed
Minor test suite adjustments
1 parent 519b225 commit 3ee332b

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

test/data/testinit.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,34 @@ define.amd = {
2424
* @result [<div id="main">, <span id="foo">, <input id="bar">]
2525
*/
2626
function q() {
27-
var r = [];
27+
var r = [],
28+
i = 0;
2829

29-
for ( var i = 0; i < arguments.length; i++ ) {
30+
for ( ; i < arguments.length; i++ ) {
3031
r.push( document.getElementById( arguments[i] ) );
3132
}
32-
3333
return r;
3434
}
3535

3636
/**
3737
* 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
3841
* @result returns true if "//[a]" return two elements with the IDs 'foo' and 'baar'
3942
*/
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;
4247

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 + '"';
4550
}
4651

47-
deepEqual(f, q.apply(q,c), a + " (" + b + ")");
52+
deepEqual(f, q.apply( q, c ), a + " (" + b + ")");
4853
}
4954

50-
5155
var createDashboardXML = function() {
5256
var string = '<?xml version="1.0" encoding="UTF-8"?> \
5357
<dashboard> \

test/unit/selector.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ testIframe("selector/html5_selector", "attributes - jQuery.attr", function( jQue
7575
}
7676

7777
/**
78-
* Asserts that a select matches the given IDs * @example t("Check for something", "//[a]", ["foo", "baar"]);
78+
* Asserts that a select matches the given IDs
79+
* @example t("Check for something", "//[a]", ["foo", "baar"]);
7980
* @param {String} a - Assertion name
8081
* @param {String} b - Sizzle selector
8182
* @param {String} c - Array of ids to construct what is expected

0 commit comments

Comments
 (0)