Removed forEach from tests to support engines that have not yet implemented that method (new in ES5)
parent
ac6fb40c21
commit
665b11e116
|
@ -100,7 +100,10 @@ propCopy( props, dest2, {
|
|||
},
|
||||
} );
|
||||
|
||||
var check = [ each, prop, method, override ];
|
||||
var check = [ each, prop, method, override ],
|
||||
check_i = check.length,
|
||||
item = null
|
||||
;
|
||||
|
||||
if ( get_set )
|
||||
{
|
||||
|
@ -108,20 +111,22 @@ if ( get_set )
|
|||
check.push( setter );
|
||||
}
|
||||
|
||||
check.forEach( function( item, i )
|
||||
while ( check_i-- )
|
||||
{
|
||||
item = check[ check_i ];
|
||||
|
||||
assert.notEqual(
|
||||
item,
|
||||
false,
|
||||
"Can override propCopy() parser functions [" + i + "]"
|
||||
"Can override propCopy() parser functions [" + check_i + "]"
|
||||
);
|
||||
|
||||
assert.ok(
|
||||
( item instanceof Function ),
|
||||
"propCopy() parser function overrides can invoke default functionality " +
|
||||
"[" + i + "]"
|
||||
"[" + check_i + "]"
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
assert.ok(
|
||||
( override_data[ 0 ] === 'method' ),
|
||||
|
|
|
@ -105,15 +105,24 @@ util.propParse( data, {
|
|||
|
||||
|
||||
// ensure properties were properly recognized
|
||||
[ 'propStr', 'propBool', 'propInt', 'propFloat', 'propArray', 'propObj' ]
|
||||
.forEach( function( item )
|
||||
{
|
||||
assert.equal(
|
||||
props[ item ],
|
||||
data[ item ],
|
||||
"Property parser properly detects class properties"
|
||||
);
|
||||
});
|
||||
var chk = [
|
||||
'propStr', 'propBool', 'propInt', 'propFloat', 'propArray', 'propObj'
|
||||
],
|
||||
|
||||
chk_i = chk.length,
|
||||
item = null
|
||||
;
|
||||
|
||||
while ( chk_i-- )
|
||||
{
|
||||
item = chk[ chk_i ];
|
||||
|
||||
assert.equal(
|
||||
props[ item ],
|
||||
data[ item ],
|
||||
"Property parser properly detects class properties"
|
||||
);
|
||||
};
|
||||
|
||||
assert.equal(
|
||||
methods.method,
|
||||
|
|
Loading…
Reference in New Issue