diff --git a/test/test-util-prop-copy.js b/test/test-util-prop-copy.js index 0ab3112..ed76c51 100644 --- a/test/test-util-prop-copy.js +++ b/test/test-util-prop-copy.js @@ -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' ), diff --git a/test/test-util-prop-parse.js b/test/test-util-prop-parse.js index a792466..0debfa8 100644 --- a/test/test-util-prop-parse.js +++ b/test/test-util-prop-parse.js @@ -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,