Skip to content
Permalink
Browse files

Minor test suite adjustments

  • Loading branch information...
timmywil committed May 28, 2012
1 parent 519b225 commit 3ee332b2382b858bb603f227f15a4212c01d9d69
Showing with 15 additions and 10 deletions.
  1. +13 −9 test/data/testinit.js
  2. +2 −1 test/unit/selector.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> \
@@ -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

0 comments on commit 3ee332b

Please sign in to comment.
You can’t perform that action at this time.