From 69391f9b48e0a91bc8368443d569be2a467a4ed2 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Mon, 27 Dec 2010 22:20:29 -0500 Subject: [PATCH] Finished correcting assertion tests with new implementation --- lib/util.js | 12 ++++++------ test/test-class-abstract.js | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/util.js b/lib/util.js index 797e6ec..48003a3 100644 --- a/lib/util.js +++ b/lib/util.js @@ -185,12 +185,6 @@ exports.propParse = function( data, options ) name = parse_data.name || prop; keywords = parse_data.keywords || {}; - // if an 'each' callback was provided, pass the data before parsing it - if ( callback_each ) - { - callback_each.call( callback_each, name, value ); - } - if ( keywords['abstract'] ) { if ( value instanceof Array ) @@ -203,6 +197,12 @@ exports.propParse = function( data, options ) } } + // if an 'each' callback was provided, pass the data before parsing it + if ( callback_each ) + { + callback_each.call( callback_each, name, value ); + } + // getter/setter if ( getter || setter ) { diff --git a/test/test-class-abstract.js b/test/test-class-abstract.js index 3344ad5..3dde593 100644 --- a/test/test-class-abstract.js +++ b/test/test-class-abstract.js @@ -177,7 +177,7 @@ assert.throws( AbstractFoo.extend( { // incorrect number of arguments - method: abstractMethod(), + 'abstract method': [], }); }, TypeError, @@ -190,7 +190,7 @@ assert.doesNotThrow( AbstractFoo.extend( { // incorrect number of arguments - method: abstractMethod( 'one', 'two', 'three', 'four' ), + 'abstract method': [ 'one', 'two', 'three', 'four' ], }); }, Error,