Commit 3ee332b2 authored by timmywil's avatar timmywil

Minor test suite adjustments

parent 519b225a
......@@ -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> \
......
......@@ -75,7 +75,8 @@ testIframe("selector/html5_selector", "attributes - jQuery.attr", function( jQue
}
/**
* Asserts that a select matches the given IDs * @example t("Check for something", "//[a]", ["foo", "baar"]);
* 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment