1
0
Fork 0

MemberBuilderValidator tests now properly wrap certain functions (they were working, but let's be safe)

closure/master
Mike Gerwitz 2011-12-06 18:26:28 -05:00
parent e4cd1eabe5
commit e385a9c8fb
4 changed files with 18 additions and 7 deletions

View File

@ -33,7 +33,10 @@ require( 'common' ).testCase(
{
var _self = this;
this.quickFailureTest = shared.quickFailureTest;
this.quickFailureTest = function()
{
shared.quickFailureTest.apply( _self, arguments );
};
this.quickVisChangeTest = function( start, override, failtest, failstr )
{

View File

@ -39,7 +39,10 @@ require( 'common' ).testCase(
};
this.quickFailureTest = shared.quickFailureTest;
this.quickFailureTest = function()
{
shared.quickFailureTest.apply( _self, arguments );
};
this.quickVisChangeTest = function( start, override, failtest, failstr )

View File

@ -31,7 +31,10 @@ require( 'common' ).testCase(
{
var _self = this;
this.quickFailureTest = shared.quickFailureTest;
this.quickFailureTest = function()
{
shared.quickFailureTest.apply( _self, arguments );
};
this.quickKeywordPropTest = function( keywords, identifier, prev )
{

View File

@ -119,11 +119,11 @@ exports.quickKeywordTest = function( type, keywords, identifier, prev )
if ( identifier )
{
_self.quickFailureTest( name, identifier, testfunc );
this.quickFailureTest.call( this, name, identifier, testfunc );
}
else
{
_self.assertDoesNotThrow( testfunc, Error );
this.assertDoesNotThrow( testfunc, Error );
}
};
@ -206,11 +206,13 @@ exports.quickVisChangeTest = function(
if ( failtest )
{
this.quickFailureTest( name, ( failstr || 'de-escalate' ), testfun );
this.quickFailureTest.call( this,
name, ( failstr || 'de-escalate' ), testfun
);
}
else
{
_self.assertDoesNotThrow( testfun, Error );
this.assertDoesNotThrow( testfun, Error );
}
};